Class TraceableEventException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.amalgamasimulation.engine.TraceableEventException
All Implemented Interfaces:
Serializable

public class TraceableEventException extends RuntimeException
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 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

      public StackTraceElement[] 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