Enum Class ErrorCode
- All Implemented Interfaces:
Serializable,Comparable<ErrorCode>,Constable
Enumeration of error codes used in the application.
Each error code has a name, numeric code, and severity level.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionError code indicating that a list was expected to be non-empty but was empty.Error code indicating an illegal argument was provided.Error code indicating that two lists were expected to be of the same size but were not.Error code indicating that more than one result was found when only one was expected.Error code indicating that a list was expected to be empty but was not.Error code indicating that no results were found when at least one was expected.Error code indicating an unexpected error occurred. -
Method Summary
Modifier and TypeMethodDescriptioncreateCoreException(String message) Creates a CoreException with this error code and the given message.createCoreException(String message, Object[] args) Creates a CoreException with this error code, the given message and arguments for message formatting.createCoreException(String message, Throwable e) Creates a CoreException with this error code, the given message and cause.createCoreException(String message, Throwable e, Object[] args) Creates a CoreException with this error code, the given message, a cause and arguments for message formatting.static ErrorCodeReturns the enum constant of this class with the specified name.static ErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ILLEGAL_ARGUMENT
Error code indicating an illegal argument was provided. -
NONE_FOUND
Error code indicating that no results were found when at least one was expected. -
MORE_THAN_ONE_FOUND
Error code indicating that more than one result was found when only one was expected. -
EMPTY_LIST
Error code indicating that a list was expected to be non-empty but was empty. -
NON_EMPTY_LIST
Error code indicating that a list was expected to be empty but was not. -
LIST_NOT_SAME_SIZE
Error code indicating that two lists were expected to be of the same size but were not. -
UNEXPECTED_ERROR
Error code indicating an unexpected error occurred.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
createCoreException
Creates a CoreException with this error code and the given message.- Parameters:
message- the error message- Returns:
- a CoreException instance
-
createCoreException
Creates a CoreException with this error code, the given message, a cause and arguments for message formatting.- Parameters:
message- the error messagee- the cause of the exceptionargs- optional arguments for message formatting.- Returns:
- a CoreException instance
-
createCoreException
Creates a CoreException with this error code, the given message and arguments for message formatting.- Parameters:
message- the error messageargs- optional arguments for message formatting.- Returns:
- a CoreException instance
-
createCoreException
Creates a CoreException with this error code, the given message and cause.- Parameters:
message- the error messagee- the cause of the exception- Returns:
- a CoreException instance
-