pub enum Error {
BackInTime,
BadExecution(Box<dyn Error + Send + Sync + 'static>),
}Expand description
Errors that may be encountered while executing a simulation.
The BackInTime variant originates from the safe interface of the serial::Simulation or
threadsafe::Simulation to indicate that an event’s scheduled execution time is prior to the simulation’s current
time. This error likely corresponds to a logical bug on the client side, e.g. forgetting to add an offset to the
current time when scheduling a new event.
The BadExecution variant originates from client code, providing a wrapper that can pass through
serial::Simulation::run() or threadsafe::Simulation::run() in a type-safe manner. Invoking source() on
this variant will acquire a shared reference to the wrapped std::error::Error for handling on the client side.
Variants§
BackInTime
The event queue rejected an event that would have been scheduled for a time that has already passed.
BadExecution(Box<dyn Error + Send + Sync + 'static>)
A client-generated error was encountered while executing an event. Call source() or unpack this value to
handle it directly.