Class CommandExecutionException

All Implemented Interfaces:
Serializable

public class CommandExecutionException extends HandlerExecutionException
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 Details

    • CommandExecutionException

      public CommandExecutionException(String message, Throwable cause)
      Initializes the exception with given message and cause.
      Parameters:
      message - The message describing the exception.
      cause - The cause of the exception.
    • CommandExecutionException

      public CommandExecutionException(String message, Throwable cause, Object details)
      Initializes the exception with given message, cause and an object providing application-specific details.
      Parameters:
      message - The message describing the exception.
      cause - The cause of the exception.
      details - An object providing more error details (maybe null).
    • CommandExecutionException

      public CommandExecutionException(String message, Throwable cause, Object details, boolean writableStackTrace)
      Initializes the exception with given message, cause, an object providing application-specific details, and writableStackTrace
      Parameters:
      message - The message describing the exception.
      cause - The cause of the exception.
      details - An object providing more error details (maybe null).
      writableStackTrace - Whether the stack trace should be generated (true) or not (false).