Class CommandExecutionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.common.AxonException
org.axonframework.messaging.HandlerExecutionException
org.axonframework.commandhandling.CommandExecutionException
- All Implemented Interfaces:
Serializable
Indicates that an exception has occurred while handling a command. Typically, this class is used to wrap checked
exceptions that have been thrown from a Command Handler while processing an incoming command.
By default, a stack trace is not generated for this exception. However, the stack trace creation can be enforced explicitly
via the constructor accepting the
writableStackTrace parameter.- Since:
- 1.3
- Author:
- Allard Buijze
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCommandExecutionException(String message, Throwable cause) Initializes the exception with givenmessageandcause.CommandExecutionException(String message, Throwable cause, Object details) Initializes the exception with givenmessage,causeand an object providing application-specificdetails.CommandExecutionException(String message, Throwable cause, Object details, boolean writableStackTrace) Initializes the exception with givenmessage,cause, an object providing application-specificdetails, andwritableStackTrace -
Method Summary
Methods inherited from class org.axonframework.messaging.HandlerExecutionException
getDetails, resolveDetailsMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CommandExecutionException
Initializes the exception with givenmessageandcause.- Parameters:
message- The message describing the exceptioncause- The cause of the exception
-
CommandExecutionException
Initializes the exception with givenmessage,causeand an object providing application-specificdetails.- Parameters:
message- The message describing the exceptioncause- The cause of the exceptiondetails- An object providing more error details (may benull)
-
CommandExecutionException
public CommandExecutionException(String message, Throwable cause, Object details, boolean writableStackTrace) Initializes the exception with givenmessage,cause, an object providing application-specificdetails, andwritableStackTrace- Parameters:
message- The message describing the exceptioncause- The cause of the exceptiondetails- An object providing more error details (may benull)writableStackTrace- Whether the stack trace should be generated (true) or not (false)
-