Package org.apache.sis.image
Enum ErrorAction
- All Implemented Interfaces:
Serializable,Comparable<ErrorAction>,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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.sis.image.ErrorHandler
ErrorHandler.Report -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionExceptions are wrapped in aLogRecordand logged atLevel.WARNING.Exceptions are wrapped in anImagingOpExceptionand thrown. -
Field Summary
Fields inherited from interface org.apache.sis.image.ErrorHandler
LOG, THROW -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(ErrorHandler.Report details) Logs the given record or throws its exception, depending onthisenumeration value.static ErrorActionReturns the enum constant of this type with the specified name.static ErrorAction[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
THROW
Exceptions are wrapped in anImagingOpExceptionand thrown. In such case, no result is available. This is the default action. -
LOG
Exceptions are wrapped in aLogRecordand logged atLevel.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
THROWor to specify their ownErrorHandlerinstead of using this error action, because not everyone read logging records.
-
-
Constructor Details
-
ErrorAction
private ErrorAction()
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
handle
Logs the given record or throws its exception, depending onthisenumeration value. This method is implemented as a matter of principle but not invoked forErrorActionenumeration values.- Specified by:
handlein interfaceErrorHandler- Parameters:
details- information about the first error. If more than one error occurred, the other errors are reported as suppressed exceptions.
-