Enum Class ErrorAction

java.lang.Object
java.lang.Enum<ErrorAction>
org.dellroad.stuff.java.ErrorAction
All Implemented Interfaces:
Serializable, Comparable<ErrorAction>, Constable

public enum ErrorAction extends Enum<ErrorAction>
Enumeration of possible actions to take when an error of some kind is detected.
  • Enum Constant Details

    • IGNORE

      public static final ErrorAction IGNORE
      Ignore the error: do nothing.
    • LOG

      public static final ErrorAction LOG
      Log the error.
    • ASSERT

      public static final ErrorAction ASSERT
      Raise an assertion error (if assertions are enabled).
    • EXCEPTION

      public static final ErrorAction EXCEPTION
  • Method Details

    • values

      public static ErrorAction[] 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 ErrorAction 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
    • execute

      public abstract void execute(String message)
      Take the action appropriate for this instance.
      Parameters:
      message - a message describing the error
      Throws:
      AssertionError - if this instance is ASSERT and assertions are enabled
      RuntimeException - if this instance is EXCEPTION