intermediate commit
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user