leaspy.exceptions module
Define custom Leaspy exceptions for better downstream handling.
Exceptions classes are nested so to handle in the most convenient way for users:
Exception
|
|
LeaspyException RuntimeError
| \ |
| LeaspyConvergenceError
/ \
TypeError / \ ValueError
| / \ |
LeaspyTypeError LeaspyInputError
/ | | \
/ | | LeaspyIndividualParamsInputError
/ | |
LeaspyDataInputError | LeaspyAlgoInputError
|
LeaspyModelInputError
- For I/O operations, non-Leaspy specific errors may be raised, in particular:
- exception LeaspyException
Bases:
ExceptionBase of all Leaspy exceptions.
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception LeaspyConvergenceError
Bases:
LeaspyException,RuntimeErrorLeaspy Exception for errors relative to convergence.
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception LeaspyTypeError
Bases:
LeaspyException,TypeErrorLeaspy Exception, deriving from TypeError.
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception LeaspyInputError
Bases:
LeaspyException,ValueErrorLeaspy Exception, deriving from ValueError.
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception LeaspyDataInputError
Bases:
LeaspyInputErrorLeaspy Input Error for data related issues.
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception LeaspyModelInputError
Bases:
LeaspyInputErrorLeaspy Input Error for model related issues.
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception LeaspyAlgoInputError
Bases:
LeaspyInputErrorLeaspy Input Error for algorithm related issues.
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- exception LeaspyIndividualParamsInputError
Bases:
LeaspyInputErrorLeaspy Input Error for individual parameters related issues.
- add_note()
Exception.add_note(note) – add a note to the exception
- args
- with_traceback()
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.