epymorph.error
Common epymorph exceptions.
ExternalDependencyError
Bases: Exception
Exception when epymorph requires a native program (or programs) to perform an application function but the program is not found.
Parameters:
GeographyError
Bases: Exception
Exception working with geographic system representations.
DimensionError
Bases: Exception
Raised when epymorph needed dimensional information that was not provided.
ValidationError
Bases: Exception
Superclass for exceptions which happen during simulation validation.
DataAttributeError
Bases: ValidationError
Exception encountered handling a data attribute.
DataAttributeErrorGroup
Bases: ExceptionGroup
, DataAttributeError
Multiple exceptions encountered handling data attributes.
MissingContextError
Bases: Exception
Exception during simulation function evaluation, where the function required context elements that were not provided.
IPMValidationError
Bases: ValidationError
Exception for invalid IPM.
MMValidationError
Bases: ValidationError
Exception for invalid MM.
InitValidationError
Bases: ValidationError
Exception for invalid Initializer.
SimValidationError
Bases: ValidationError
Exception for cases where a simulation is invalid as configured, typically because the MM, IPM, or Initializer require data attributes that are not available.
SimCompilationError
Bases: Exception
Exception during the compilation phase of the simulation.
SimulationError
Bases: Exception
Superclass for exceptions which happen during simulation runtime.
InitError
Bases: SimulationError
Exception for invalid initialization.
IPMSimError
Bases: SimulationError
Exception during IPM processing.
IPMSimNaNError
Bases: _WithFieldsMixin
, IPMSimError
Exception raised when an IPM transition rate is NaN.
IPMSimLessThanZeroError
Bases: _WithFieldsMixin
, IPMSimError
Exception raised when an IPM transition rate is less than zero.
IPMSimInvalidForkError
Bases: _WithFieldsMixin
, IPMSimError
Exception raised when an IPM fork transition's probabilities are invalid.
MMSimError
Bases: SimulationError
Exception during MM processing.
error_gate
Begin a context that standardizes errors linked to a particular simulation phase. Wrap the phase in an error gate and all exceptions raised within will be normalized.
If an exception of type exception_type
is caught, it will be re-raised as-is.
If an exception is caught from the list of exception types in reraises
,
the exception will be stringified and re-raised as exception_type
.
All other exceptions will be labeled as "unknown errors".
Parameters: