sym.sdk.exceptions.sym_exception¶
Exceptions
A trait that can be mixed into Exception classes that want to have messages formatted with a hint. |
|
This is the base class for all exceptions raised by the Sym Runtime. |
- exception sym.sdk.exceptions.sym_exception.ExceptionWithHint(error_type: str, name: str, message: str)¶
Bases:
sym.sdk.exceptions.sym_exception.SymException
A trait that can be mixed into Exception classes that want to have messages formatted with a hint.
Overrides the
__str__
method to provide a formatted output string.i.e. the output will look like > This is my main exception message > > Hint: This is the exception hint
Caution: This class should not be used for matching exceptions in
except
statements!- property hint¶
The string to be displayed in the Hint section
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception sym.sdk.exceptions.sym_exception.SymException(error_type: str, name: str, message: str)¶
Bases:
Exception
This is the base class for all exceptions raised by the Sym Runtime.
- Parameters
error_type – The class of exception (used as the first part of the error_code, e.g. AuthenticationError)
name – The name of the exception (used as the second part of the error_code, e.g. INVALID_JWT)
message – The exception message to display
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.