#[non_exhaustive]pub enum ExecutionError {
Halted,
Terminated,
Deadlock(Vec<DeadlockInfo>),
MessageLoss(usize),
NoRecipient {
model: Option<String>,
},
Panic {
model: String,
payload: Box<dyn Any + Send + 'static>,
},
Timeout,
OutOfSync(Duration),
BadQuery,
InvalidDeadline(MonotonicTime),
}
Expand description
An error returned upon simulation execution failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Halted
The simulation has been intentionally interrupted with a call to
Scheduler::halt
.
The simulation remains in a well-defined state and can be resumed.
Terminated
The simulation has been terminated due to an earlier deadlock, message loss, missing recipient, model panic, timeout or synchronization loss.
Deadlock(Vec<DeadlockInfo>)
The simulation has deadlocked due to the enlisted models.
This is a fatal error: any subsequent attempt to run the simulation will
return an ExecutionError::Terminated
error.
MessageLoss(usize)
One or more message were left unprocessed because the recipient’s mailbox was not migrated to the simulation.
The payload indicates the number of lost messages.
This is a fatal error: any subsequent attempt to run the simulation will
return an ExecutionError::Terminated
error.
NoRecipient
The recipient of a message does not exists.
This indicates that the mailbox of the recipient of a message was not migrated to the simulation and was no longer alive when the message was sent.
This is a fatal error: any subsequent attempt to run the simulation will
return an ExecutionError::Terminated
error.
Fields
Panic
A panic was caught during execution.
This is a fatal error: any subsequent attempt to run the simulation will
return an ExecutionError::Terminated
error.
Fields
Timeout
The simulation step has failed to complete within the allocated time.
This is a fatal error: any subsequent attempt to run the simulation will
return an ExecutionError::Terminated
error.
See also SimInit::set_timeout
and Simulation::set_timeout
.
OutOfSync(Duration)
The simulation has lost synchronization with the clock and lags behind by the duration given in the payload.
This is a fatal error: any subsequent attempt to run the simulation will
return an ExecutionError::Terminated
error.
See also SimInit::set_clock_tolerance
.
BadQuery
The query did not obtain a response because the mailbox targeted by the query was not found in the simulation.
This is a non-fatal error.
InvalidDeadline(MonotonicTime)
The specified simulation deadline is in the past of the current simulation time.
This is a non-fatal error.
Trait Implementations§
Source§impl Debug for ExecutionError
impl Debug for ExecutionError
Source§impl Display for ExecutionError
impl Display for ExecutionError
Source§impl Error for ExecutionError
impl Error for ExecutionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<ExecutionError> for SimulationError
impl From<ExecutionError> for SimulationError
Source§fn from(e: ExecutionError) -> Self
fn from(e: ExecutionError) -> Self
Auto Trait Implementations§
impl Freeze for ExecutionError
impl !RefUnwindSafe for ExecutionError
impl Send for ExecutionError
impl !Sync for ExecutionError
impl Unpin for ExecutionError
impl !UnwindSafe for ExecutionError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request