Package com.chemaxon.calculations.io
Enum SimpleErrorHandling
- java.lang.Object
-
- java.lang.Enum<SimpleErrorHandling>
-
- com.chemaxon.calculations.io.SimpleErrorHandling
-
- All Implemented Interfaces:
Serializable
,Comparable<SimpleErrorHandling>
@PublicAPI @Beta public enum SimpleErrorHandling extends Enum<SimpleErrorHandling>
Error handling preference.Please note that this enum is marked with
Beta
annotation, so it can be subject of incompatible changes or removal in later releases.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Consumer<Exception>
getSuitableErrorHandler()
Get a default error handler.static SimpleErrorHandling
valueOf(String name)
Returns the enum constant of this type with the specified name.static SimpleErrorHandling[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FAIL
public static final SimpleErrorHandling FAIL
Fail in case of an input related error. Failure is ensured by throwing a newIllegalStateException
with the reportedException
as its cause.
-
LOG
public static final SimpleErrorHandling LOG
Note and log error but try to continue. Logging is done by writing theThrowable.getMessage()
toSystem.err
.
-
SILENT
public static final SimpleErrorHandling SILENT
Continue in case of error. Doing nothing when anException
is reported.
-
-
Method Detail
-
values
public static SimpleErrorHandling[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (SimpleErrorHandling c : SimpleErrorHandling.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SimpleErrorHandling 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 nameNullPointerException
- if the argument is null
-
-