public enum FailureReason extends Enum<FailureReason> implements NamedEnum
Each failure is categorized as one of the following reasons.
| Enum Constant and Description |
|---|
CALCULATION_FAILED
The operation could not be performed.
|
CURRENCY_CONVERSION
Currency conversion failed.
|
ERROR
An error occurred.
|
INVALID
The input was invalid.
|
MISSING_DATA
The operation failed because data was missing.
|
MULTIPLE
There were multiple failures of different types.
|
NOT_APPLICABLE
The operation requested was not applicable.
|
OTHER
Failure occurred for some other reason.
|
PARSING
A parsing error occurred.
|
UNSUPPORTED
The operation requested is unsupported.
|
| Modifier and Type | Method and Description |
|---|---|
static FailureReason |
of(String name)
Obtains an instance from the specified name.
|
String |
toString()
Returns the formatted name of the type.
|
static FailureReason |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static FailureReason[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final FailureReason MULTIPLE
An operation may produce zero to many errors. If there is one error then that reason is used. If there are many errors then the overall reason is "multiple".
public static final FailureReason ERROR
Where possible, a more specific reason code should be used.
public static final FailureReason INVALID
One or more input parameters was invalid.
public static final FailureReason PARSING
This is used when an error occurred during parsing. Typically, this refers to parsing a file, such as CSV or XML.
public static final FailureReason NOT_APPLICABLE
This is used when the particular combination of inputs is not applicable, but given a different combination a result could have been calculated. For example, this might occur in a grid of results where the calculation requested for a column is not applicable for every row.
public static final FailureReason UNSUPPORTED
The operation failed because it is not supported.
public static final FailureReason MISSING_DATA
One or more pieces of data that the operation required were missing.
public static final FailureReason CURRENCY_CONVERSION
This is used to indicate that the operation failed during currency conversion, perhaps due to missing FX rates.
public static final FailureReason CALCULATION_FAILED
This is used to indicate that a calculation failed.
public static final FailureReason OTHER
This reason should only be used when no other type is applicable. If using this reason, please consider raising an issue to get another more descriptive reason added.
public static FailureReason[] values()
for (FailureReason c : FailureReason.values()) System.out.println(c);
public static FailureReason valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static FailureReason of(String name)
Parsing handles the mixed case form produced by toString() and
the upper and lower case variants of the enum constant name.
name - the name to parseIllegalArgumentException - if the name is not knownpublic String toString()
toString in class Enum<FailureReason>Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.