Skip to content

nexosim.exceptions

Simulation-related exceptions.

All exceptions derive from the SimulationError class.

SimulationError

Bases: Exception

The base class for exceptions thrown by a Simulation.

InternalError

Bases: SimulationError

Raised when an internal implementation error occurs.

MissingArgumentError

Bases: SimulationError

Raised when a simulation call was invoked with too few arguments.

InvalidTimeError

Bases: SimulationError

Raised when the provided timestamp is not well-formed.

InvalidPeriodError

Bases: SimulationError

Raised when a null or negative period was provided.

InvalidDeadlineError

Bases: SimulationError

Raised when a deadline that is not in the future of the current simulation time was provided.

InvalidMessageError

Bases: SimulationError

Raised when the provided event, query or initialization configuration message is invalid.

InvalidKeyError

Bases: SimulationError

Raised when an event key is invalid or outdated.

InvalidTimeoutError

Bases: SimulationError

Raised when a negative timeout was provided.

BenchPanicError

Bases: SimulationError

Raised when the simulation bench builder has panicked.

BenchError

Bases: SimulationError

Raised when the simulation bench building has failed.

BenchNotBuiltError

Bases: SimulationError

Raised when the simulation is initialized or restored before being built.

DuplicateEventSourceError

Bases: SimulationError

Raised when an attempt to add an event source has failed because the provided path is already in use by another event source.

DuplicateQuerySourceError

Bases: SimulationError

Raised when an attempt to add a query source has failed because the provided path is already in use by another query source.

DuplicateEventSinkError

Bases: SimulationError

Raised when an attempt to add an event sink has failed because the provided path is already in use by another event sink.

InvalidBenchConfigError

Bases: SimulationError

Raised when the simulation bench configuration could not be deserialized.

SimulationPanicError

Bases: SimulationError

Raised when a panic is caught during execution.

SimulationNotStartedError

Bases: SimulationError

Raised when the simulation is invoked before it was initialized.

SimulationTerminatedError

Bases: SimulationError

Raised when the simulation has been terminated due to an earlier deadlock, message loss, missing recipient, model panic, timeout, or synchronization loss.

SimulationDeadlockError

Bases: SimulationError

Raised when the simulation has deadlocked.

SimulationMessageLossError

Bases: SimulationError

Raised when a message was left unprocessed because the recipient's mailbox was not migrated to the simulation.

SimulationNoRecipientError

Bases: SimulationError

Raised when the recipient of a message does not exists.

SimulationTimeoutError

Bases: SimulationError

Raised when a simulation step fails to complete within the allocated time.

SimulationOutOfSyncError

Bases: SimulationError

Raised when the simulation has lost synchronization with the clock.

SimulationBadQueryError

Bases: SimulationError

Raised when a query did not obtain a response because the mailbox targeted by the query was not found in the simulation.

SimulationTimeOutOfRangeError

Bases: SimulationError

Raised when the provided simulation time is out of the range supported by the Python timestamp.

EventSourceNotFoundError

Bases: SimulationError

Raised when the provided name does not match any event source.

QuerySourceNotFoundError

Bases: SimulationError

Raised when the provided name does not match any query source.

SinkNotFoundError

Bases: SimulationError

Raised when the provided name does not match any event sink.

SinkTerminatedError

Bases: SimulationError

Raised when an event sink has no sender.

SinkReadRaceError

Bases: SimulationError

Raised when a concurrent read operation on an event sink has been attempted.

SinkReadTimeoutError

Bases: SimulationError

Raised a read operation on an event sink has timed out.

InvalidEventTypeError

Bases: SimulationError

Raised when the specified event type for an event source or event sink does not match the expected type.

InvalidQueryTypeError

Bases: SimulationError

Raised when the specified request or reply types for a query source do not match the respective expected types.

SaveError

Bases: SimulationError

Raised when a simulation state store procedure has failed.

RestoreError

Bases: SimulationError

Raised when a simulation state restore procedure has failed.

UnexpectedError

Bases: SimulationError

Raised when an internal implementation error occurs.