Package com.amalgamasimulation.engine
Class TraceableEventException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.amalgamasimulation.engine.TraceableEventException
- All Implemented Interfaces:
Serializable
A wrapper class for exceptions that occur in simulation events of
Engine
that contains additional context that helps to better
understand the circumstances of when the underlying exception has been
thrown. This class is used is the engine is in events tracing mode (see
Engine.setTraceEvents(boolean)
method)- Author:
- Andrey Malykhanov
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the unique identifier of the event in which the exception occurred.double
Returns the simulation time when the event was scheduled.Returns the stack trace of the point in code from where this event was scheduled.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
scheduledEventId
public long scheduledEventId()Returns the unique identifier of the event in which the exception occurred.- Returns:
- unique identifier of the event where the exception occurred
-
scheduledStackTrace
Returns the stack trace of the point in code from where this event was scheduled.- Returns:
- stack trace in the form of array of stack trace elements
(
StackTraceElement
)
-
scheduledModelTime
public double scheduledModelTime()Returns the simulation time when the event was scheduled.- Returns:
- simulation time when the event was scheduled
-