Exceptions
All package-specific simulation exceptions inherit from SwmmError. Catch the
narrowest type your application can handle. ValidationError and
LifecycleError leave a healthy owner reusable. ConfigurationError keeps
ordered .diagnostics so you can repair the configuration and retry. An
operational SolverError can put the generation in FAILED.
Native SwmmError instances expose .native_code, .operation, .detail,
and .semantic_code. SolverError.code remains a SolverErrorCode; its
.semantic_code retains the more specific path code when one exists. Secondary
cleanup failures retained by the solver are included in .detail.
Each ConfigurationDiagnostic contains object, property_path, rule_code,
message, and optional conflicting_object. str(ConfigurationError) includes
all ordered diagnostic lines for ordinary tracebacks. See Errors and
recovery for handling examples. Finalized
binary output uses the separate swmmrs.output.OutputError hierarchy.
Public exception hierarchy for Python simulation operations.
| CLASS | DESCRIPTION |
|---|---|
ConfigurationDiagnostic |
Describe one ordered post-open configuration violation. |
ConfigurationError |
Report post-open preparation diagnostics without invalidating the owner. |
ConfigurationObjectIdentity |
Identify one configured object named by a configuration diagnostic. |
InternalSimulationError |
Report an isolated native Simulation Owner that is permanently unavailable. |
LifecycleError |
Report an operation that is invalid in the current lifecycle state. |
SolverError |
Report a project or lifecycle operation rejected by the native solver. |
StaleViewError |
Report access through a Live View from an inactive Project Generation. |
SwmmError |
Base class for supported package failures. |
ValidationError |
Report a public argument rejected before native state mutation. |
ConfigurationDiagnostic
Describe one ordered post-open configuration violation.
ConfigurationError
flowchart TD
swmmrs.exceptions.ConfigurationError[ConfigurationError]
swmmrs.exceptions.SwmmError[SwmmError]
swmmrs.exceptions.SwmmError --> swmmrs.exceptions.ConfigurationError
click swmmrs.exceptions.ConfigurationError href "" "swmmrs.exceptions.ConfigurationError"
click swmmrs.exceptions.SwmmError href "" "swmmrs.exceptions.SwmmError"
Report post-open preparation diagnostics without invalidating the owner.
| METHOD | DESCRIPTION |
|---|---|
__str__ |
Include every ordered structured diagnostic in traceback text. |
ConfigurationObjectIdentity
Identify one configured object named by a configuration diagnostic.
InternalSimulationError
flowchart TD
swmmrs.exceptions.InternalSimulationError[InternalSimulationError]
swmmrs.exceptions.SwmmError[SwmmError]
swmmrs.exceptions.SwmmError --> swmmrs.exceptions.InternalSimulationError
click swmmrs.exceptions.InternalSimulationError href "" "swmmrs.exceptions.InternalSimulationError"
click swmmrs.exceptions.SwmmError href "" "swmmrs.exceptions.SwmmError"
Report an isolated native Simulation Owner that is permanently unavailable.
LifecycleError
flowchart TD
swmmrs.exceptions.LifecycleError[LifecycleError]
swmmrs.exceptions.SwmmError[SwmmError]
swmmrs.exceptions.SwmmError --> swmmrs.exceptions.LifecycleError
click swmmrs.exceptions.LifecycleError href "" "swmmrs.exceptions.LifecycleError"
click swmmrs.exceptions.SwmmError href "" "swmmrs.exceptions.SwmmError"
Report an operation that is invalid in the current lifecycle state.
SolverError
flowchart TD
swmmrs.exceptions.SolverError[SolverError]
swmmrs.exceptions.SwmmError[SwmmError]
swmmrs.exceptions.SwmmError --> swmmrs.exceptions.SolverError
click swmmrs.exceptions.SolverError href "" "swmmrs.exceptions.SolverError"
click swmmrs.exceptions.SwmmError href "" "swmmrs.exceptions.SwmmError"
Report a project or lifecycle operation rejected by the native solver.
| ATTRIBUTE | DESCRIPTION |
|---|---|
code |
Stable category for the native failure.
TYPE:
|
native_code |
Numeric SWMM error code.
TYPE:
|
operation |
Public operation that triggered the failure.
TYPE:
|
detail |
Optional solver-provided diagnostic detail, including any secondary cleanup failure retained by the solver.
TYPE:
|
semantic_code |
Stable semantic failure code.
TYPE:
|
StaleViewError
flowchart TD
swmmrs.exceptions.StaleViewError[StaleViewError]
swmmrs.exceptions.LifecycleError[LifecycleError]
swmmrs.exceptions.SwmmError[SwmmError]
swmmrs.exceptions.LifecycleError --> swmmrs.exceptions.StaleViewError
swmmrs.exceptions.SwmmError --> swmmrs.exceptions.LifecycleError
click swmmrs.exceptions.StaleViewError href "" "swmmrs.exceptions.StaleViewError"
click swmmrs.exceptions.LifecycleError href "" "swmmrs.exceptions.LifecycleError"
click swmmrs.exceptions.SwmmError href "" "swmmrs.exceptions.SwmmError"
Report access through a Live View from an inactive Project Generation.
SwmmError
flowchart TD
swmmrs.exceptions.SwmmError[SwmmError]
click swmmrs.exceptions.SwmmError href "" "swmmrs.exceptions.SwmmError"
Base class for supported package failures.
Notes
Catch this class to handle all public binding failures without catching unrelated Python exceptions.
ValidationError
flowchart TD
swmmrs.exceptions.ValidationError[ValidationError]
swmmrs.exceptions.SwmmError[SwmmError]
swmmrs.exceptions.SwmmError --> swmmrs.exceptions.ValidationError
click swmmrs.exceptions.ValidationError href "" "swmmrs.exceptions.ValidationError"
click swmmrs.exceptions.SwmmError href "" "swmmrs.exceptions.SwmmError"
Report a public argument rejected before native state mutation.