errors¶
This module contains the exceptions raised by the package.
Exceptions¶
-
exception
DatetimeSyntaxError(message, value)[source]¶ Bases:
rule_engine.errors.SyntaxErrorAn error raised for issues regarding the use of improperly formatted datetime expressions.
-
__init__(message, value)[source]¶ Parameters: message (str) – A text description of what error occurred.
-
value= None¶ The datetime value which contains the syntax error which caused this exception to be raised.
-
-
exception
EngineError(message='')[source]¶ Bases:
ExceptionThe base exception class from which other exceptions within this package inherit.
-
message= None¶ The message describing the error that occurred.
-
-
exception
EvaluationError(message='')[source]¶ Bases:
rule_engine.errors.EngineErrorAn error raised for issues which occur while the rule is being evaluated. This can occur at parse time while AST nodes are being evaluated during the reduction phase.
-
exception
RegexSyntaxError(message, error)[source]¶ Bases:
rule_engine.errors.SyntaxErrorAn error raised for issues regarding the use of improper regular expression syntax.
-
__init__(message, error)[source]¶ Parameters: message (str) – A text description of what error occurred.
-
value¶ The regular expression value which contains the syntax error which caused this exception to be raised.
-
-
exception
RuleSyntaxError(message, token=None)[source]¶ Bases:
rule_engine.errors.SyntaxErrorAn error raised for issues identified in while parsing the grammar of the rule text.
-
__init__(message, token=None)[source]¶ Parameters: message (str) – A text description of what error occurred.
-
token= None¶ The PLY token (if available) which is related to the syntax error.
-
-
exception
SymbolResolutionError(symbol_name, symbol_scope=None)[source]¶ Bases:
rule_engine.errors.EvaluationErrorAn error raised when a symbol name is not able to be resolved to a value.
-
symbol_name= None¶ The name of the symbol that can not be resolved.
-
symbol_scope= None¶ The scope of where the symbol should be valid for resolution.
-
-
exception
SymbolTypeError(symbol_name, is_value, is_type, expected_type)[source]¶ Bases:
rule_engine.errors.EvaluationErrorAn error raised when a symbol with type information is resolved to a python value that is not of that type.
-
__init__(symbol_name, is_value, is_type, expected_type)[source]¶ Parameters: message (str) – A text description of what error occurred.
-
expected_type= None¶ The
rule-engine typethat was expected for this symbol.
-
is_type= None¶ The
rule-engine typeof the incompatible symbol.
-
is_value= None¶ The native Python value of the incompatible symbol.
-
symbol_name= None¶ The name of the symbol that is of an incompatible type.
-
-
exception
SyntaxError(message='')[source]¶ Bases:
rule_engine.errors.EngineErrorA base error for syntax related issues.