leaspy.exceptions

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:

Exceptions

LeaspyException

Base of all Leaspy exceptions.

LeaspyConvergenceError

Leaspy Exception for errors relative to convergence.

LeaspyTypeError

Leaspy Exception, deriving from TypeError.

LeaspyInputError

Leaspy Exception, deriving from ValueError.

LeaspyDataInputError

Leaspy Input Error for data related issues.

LeaspyModelInputError

Leaspy Input Error for model related issues.

LeaspyAlgoInputError

Leaspy Input Error for algorithm related issues.

LeaspyIndividualParamsInputError

Leaspy Input Error for individual parameters related issues.

Module Contents

exception LeaspyException

Bases: Exception

Base of all Leaspy exceptions.

exception LeaspyConvergenceError

Bases: LeaspyException, RuntimeError

Leaspy Exception for errors relative to convergence.

exception LeaspyTypeError

Bases: LeaspyException, TypeError

Leaspy Exception, deriving from TypeError.

exception LeaspyInputError

Bases: LeaspyException, ValueError

Leaspy Exception, deriving from ValueError.

exception LeaspyDataInputError

Bases: LeaspyInputError

Leaspy Input Error for data related issues.

exception LeaspyModelInputError

Bases: LeaspyInputError

Leaspy Input Error for model related issues.

exception LeaspyAlgoInputError

Bases: LeaspyInputError

Leaspy Input Error for algorithm related issues.

exception LeaspyIndividualParamsInputError

Bases: LeaspyInputError

Leaspy Input Error for individual parameters related issues.