Enum Class ErrorCode
- All Implemented Interfaces:
Serializable,Comparable<ErrorCode>,Constable
Converts an Axon Server Error to the relevant Axon framework exception.
- Since:
- 4.0
- Author:
- Marc Gathier
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionconvert(io.axoniq.axonserver.grpc.ErrorMessage errorMessage) Converts theerrorMessageto the relevant AxonExceptionConverts theerrorMessageto the relevant AxonExceptionConverts thesourceand thethrowableto the relevant AxonExceptionConverts thethrowableto the relevant AxonExceptionstatic ErrorCodegetCommandExecutionErrorCode(Throwable throwable) Returns an Command Execution ErrorCode variation based on the transiency of the givenThrowablestatic ErrorCodegetFromCode(String code) static ErrorCodegetQueryExecutionErrorCode(Throwable throwable) Returns a Query Execution ErrorCode variation based on the transiency of the givenThrowablestatic 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
-
AUTHENTICATION_TOKEN_MISSING
-
AUTHENTICATION_INVALID_TOKEN
-
UNSUPPORTED_INSTRUCTION
-
INSTRUCTION_ACK_ERROR
-
INSTRUCTION_EXECUTION_ERROR
-
INVALID_EVENT_SEQUENCE
-
NO_EVENT_STORE_MASTER_AVAILABLE
-
EVENT_PAYLOAD_TOO_LARGE
-
CONNECTION_FAILED
-
GRPC_MESSAGE_TOO_LARGE
-
NO_HANDLER_FOR_COMMAND
-
COMMAND_EXECUTION_ERROR
-
COMMAND_DISPATCH_ERROR
-
CONCURRENCY_EXCEPTION
-
COMMAND_EXECUTION_NON_TRANSIENT_ERROR
-
NO_HANDLER_FOR_QUERY
-
QUERY_EXECUTION_ERROR
-
QUERY_DISPATCH_ERROR
-
QUERY_EXECUTION_NON_TRANSIENT_ERROR
-
DATAFILE_READ_ERROR
-
INDEX_READ_ERROR
-
DATAFILE_WRITE_ERROR
-
INDEX_WRITE_ERROR
-
DIRECTORY_CREATION_FAILED
-
VALIDATION_FAILED
-
TRANSACTION_ROLLED_BACK
-
OTHER
-
-
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
-
getFromCode
-
errorCode
-
convert
public AxonException convert(io.axoniq.axonserver.grpc.ErrorMessage errorMessage, Supplier<Object> details) Converts theerrorMessageto the relevant AxonException- Parameters:
errorMessage- the descriptor of the errordetails- a supplier of (optional) application-specific details to be included in Exception, when appropriate- Returns:
- the Axon Framework exception
-
convert
Converts theerrorMessageto the relevant AxonException- Parameters:
errorMessage- the descriptor of the error- Returns:
- the Axon Framework exception
-
convert
Converts thethrowableto the relevant AxonException- Parameters:
throwable- the descriptor of the error- Returns:
- the Axon Framework exception
-
convert
Converts thesourceand thethrowableto the relevant AxonException- Parameters:
source- The location that originally reported the errorthrowable- the descriptor of the error- Returns:
- the Axon Framework exception
-
getQueryExecutionErrorCode
Returns a Query Execution ErrorCode variation based on the transiency of the givenThrowable -
getCommandExecutionErrorCode
Returns an Command Execution ErrorCode variation based on the transiency of the givenThrowable
-