Enum Class SimulatorFinishEvent.Reason

java.lang.Object
java.lang.Enum<SimulatorFinishEvent.Reason>
mars.simulator.SimulatorFinishEvent.Reason
All Implemented Interfaces:
Serializable, Comparable<SimulatorFinishEvent.Reason>, Constable
Enclosing class:
SimulatorFinishEvent

public static enum SimulatorFinishEvent.Reason extends Enum<SimulatorFinishEvent.Reason>
Enumeration of reasons for why the simulator might finish or terminate.
  • Enum Constant Details

    • EXCEPTION

      public static final SimulatorFinishEvent.Reason EXCEPTION
      An exception occurred, causing the program to terminate.
    • EXIT_SYSCALL

      public static final SimulatorFinishEvent.Reason EXIT_SYSCALL
      One of the exit syscalls was invoked, causing the program to terminate.
    • RAN_OFF_BOTTOM

      public static final SimulatorFinishEvent.Reason RAN_OFF_BOTTOM
      A null instruction was reached (the program counter ran off the bottom), causing the program to terminate.
    • INTERNAL_ERROR

      public static final SimulatorFinishEvent.Reason INTERNAL_ERROR
      An unhandled internal error occurred during execution, causing the simulator thread to terminate prematurely.
    • EXTERNAL

      public static final SimulatorFinishEvent.Reason EXTERNAL
      The program was terminated by something outside of the simulator. This is usually caused by the Stop action.
  • Method Details

    • values

      public static SimulatorFinishEvent.Reason[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SimulatorFinishEvent.Reason valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null