intermediate commit

This commit is contained in:
2024-09-22 09:27:20 +02:00
parent a729d98a0d
commit 3be854d34c
14 changed files with 441 additions and 108 deletions
+14
View File
@@ -18,6 +18,20 @@ class MethodAccessError(SheerkaException):
return f"Cannot access method '{self.method_name}'"
class NotEnoughParameters(SheerkaException):
"""
Exception when not enough parameters are found during Sya parsing
"""
def __init__(self, concept_to_recognize, expected_nb_parameters, nb_parameters_found):
self.concept = concept_to_recognize
self.expected = expected_nb_parameters
self.found = nb_parameters_found
def get_error_msg(self) -> str:
return f"Failed to parse {self.concept}. Expecting {self.expected} parameters, but only found {self.found}."
@dataclass
class ErrorObj:
def get_error_msg(self) -> str: