Enum ErrorAction

java.lang.Object
java.lang.Enum<ErrorAction>
org.apache.sis.image.ErrorAction
All Implemented Interfaces:
Serializable, Comparable<ErrorAction>, java.lang.constant.Constable, ErrorHandler

enum ErrorAction extends Enum<ErrorAction> implements ErrorHandler
Some common ways to handle exceptions occurring during tile calculation. This class provides the implementations of ErrorHandler static constants.
Since:
1.1
Version:
1.1
  • Enum Constant Details

    • THROW

      public static final ErrorAction THROW
      Exceptions are wrapped in an ImagingOpException and thrown. In such case, no result is available. This is the default action.
    • LOG

      public static final ErrorAction LOG
      Exceptions are wrapped in a LogRecord and logged at Level.WARNING. Only one log record is created for all tiles that failed for the same operation on the same image. A partial result may be available.

      Users are encouraged to use THROW or to specify their own ErrorHandler instead of using this error action, because not everyone read logging records.

  • Constructor Details

    • ErrorAction

      private ErrorAction()
  • Method Details

    • values

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

      public static ErrorAction valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • handle

      public void handle(ErrorHandler.Report details)
      Logs the given record or throws its exception, depending on this enumeration value. This method is implemented as a matter of principle but not invoked for ErrorAction enumeration values.
      Specified by:
      handle in interface ErrorHandler
      Parameters:
      details - information about the first error. If more than one error occurred, the other errors are reported as suppressed exceptions.