Skip to content

TermException exception

Bases: PyORlibException

An exception class for handling errors related to terms in an optimization model.

The TermException class is a subclass of the CoreException class and is used to handle exceptions specific to terms in a mathematical model, such as validations.

Source code in pyorlib/exceptions/term_exception.py
class TermException(PyORlibException):
    """
    An exception class for handling errors related to terms in an optimization model.

    The TermException class is a subclass of the CoreException class and is used to handle
    exceptions specific to terms in a mathematical model, such as validations.
    """

    def __init__(self, message: str = "Term exception"):
        super().__init__(message)

Attributes

errors instance-attribute

errors: str | List[str] = errors if errors else __name__

Functions

__init__

__init__(message: str = 'Term exception')
Source code in pyorlib/exceptions/term_exception.py
def __init__(self, message: str = "Term exception"):
    super().__init__(message)