errors

Exceptions

ApplicationError

An exception used when an external application generates an error.

DeferredImportError

This exception is raised when something attempts to access a module that was imported by attempt_import(), but the module import failed.

DeveloperError

Exception class used to throw errors that result from Pyomo programming errors, rather than user modeling errors (e.g., a component not declaring a 'ctype').

InfeasibleConstraintException

Exception class used by Pyomo transformations to indicate that an infeasible constraint has been identified (e.g. in the course of range reduction).

IntervalException

Exception class used for errors in interval arithmetic.

InvalidValueError

Exception class used for value errors in compiled model representations

IterationLimitError

A subclass of RuntimeError, raised by an iterative method when the iteration limit is reached.

MouseTrap

Exception class used to throw errors for not-implemented functionality that might be rational to support (i.e., we already gave you a cookie) but risks taking Pyomo's flexibility a step beyond what is sane, or solvable, or communicable to a solver, etc.

NondifferentiableError

A Pyomo-specific ValueError raised for non-differentiable expressions

PyomoException

Exception class for other Pyomo exceptions to inherit from, allowing Pyomo exceptions to be caught in a general way (e.g., in other applications that use Pyomo).

TempfileContextError

A Pyomo-specific IndexError raised when attempting to use the TempfileManager when it does not have a currently active context.

TemplateExpressionError(template, *args, **kwds)

Special ValueError raised by getitem for template arguments

Functions

format_exception(msg[, prolog, epilog, ...])

Generate a formatted exception message