errors
¶
tt error types.
errors.base
module¶
The base tt exception type.
-
exception
tt.errors.base.
TtError
(message, *args)¶ Bases:
Exception
Base exception type for tt errors.
-
message
¶ str
An additional helpful message that could be displayed to the user to better explain the error.
Warning
This exception type should be sub-classed and is not meant to be raised explicitly.
-
errors.evaluation
module¶
Exception type definitions related to expression evaluation.
-
exception
tt.errors.evaluation.
DuplicateSymbolError
(message, *args)¶ Bases:
tt.errors.evaluation.EvaluationError
An exception type for user-specified duplicate symbols.
-
exception
tt.errors.evaluation.
EvaluationError
(message, *args)¶ Bases:
tt.errors.base.TtError
An exception type for errors occurring in expression evaluation.
Warning
This exception type should be sub-classed and is not meant to be raised explicitly.
-
exception
tt.errors.evaluation.
ExtraSymbolError
(message, *args)¶ Bases:
tt.errors.evaluation.EvaluationError
An exception for a passed token that is not a parsed symbol.
-
exception
tt.errors.evaluation.
InvalidBooleanValueError
(message, *args)¶ Bases:
tt.errors.evaluation.EvaluationError
An exception for an invalid truth value passed in evaluation.
-
exception
tt.errors.evaluation.
MissingSymbolError
(message, *args)¶ Bases:
tt.errors.evaluation.EvaluationError
An exception type for a missing token value in evaluation.
-
exception
tt.errors.evaluation.
NoEvaluationVariationError
(message, *args)¶ Bases:
tt.errors.evaluation.EvaluationError
An exception type for when evaluation of an expression will not vary.
errors.generic
module¶
Generic exception types.
-
exception
tt.errors.generic.
InvalidArgumentTypeError
(message, *args)¶ Bases:
tt.errors.base.TtError
An exception type for invalid argument types.
errors.grammar
module¶
Exception type definitions related to expression grammar and parsing.
-
exception
tt.errors.grammar.
BadParenPositionError
(message, expr_str=None, error_pos=None, *args)¶ Bases:
tt.errors.grammar.GrammarError
An exception type for unexpected parentheses.
-
exception
tt.errors.grammar.
EmptyExpressionError
(message, expr_str=None, error_pos=None, *args)¶ Bases:
tt.errors.grammar.GrammarError
An exception type for when an empty expression is received.
-
exception
tt.errors.grammar.
ExpressionOrderError
(message, expr_str=None, error_pos=None, *args)¶ Bases:
tt.errors.grammar.GrammarError
An exception type for unexpected operands or operators.
-
exception
tt.errors.grammar.
GrammarError
(message, expr_str=None, error_pos=None, *args)¶ Bases:
tt.errors.base.TtError
Base type for errors that occur in the handling of expression.
-
message
¶ str
An additional helpful message that could be displayed to the user to better explain the error.
-
expr_str
¶ str, optional
The expression in which the grammar error occured; can be left as
None
if the error position will not be specified.
-
error_pos
¶ int, optional
The index indicating at which position int
expr_str
the troublesome spot began; can be left asNone
for errors without a specific troublesome position.
Warning
This exception type should be sub-classed and is not meant to be raised explicitly.
-
-
exception
tt.errors.grammar.
UnbalancedParenError
(message, expr_str=None, error_pos=None, *args)¶ Bases:
tt.errors.grammar.GrammarError
An exception type for unbalanced parentheses.