public abstract class HandlerExecutionException extends AxonException
writableStackTrace
parameter.Constructor and Description |
---|
HandlerExecutionException(String message)
Initializes an execution exception with given
message . |
HandlerExecutionException(String message,
Throwable cause)
Initializes an execution exception with given
message and cause . |
HandlerExecutionException(String message,
Throwable cause,
Object details)
Initializes an execution exception with given
message , cause and application-specific
details . |
HandlerExecutionException(String message,
Throwable cause,
Object details,
boolean writableStackTrace)
Initializes an execution exception with given
message , cause , application-specific
details , and writableStackTrace |
Modifier and Type | Method and Description |
---|---|
<R> Optional<R> |
getDetails()
Returns an Optional containing application-specific details of the exception, if any were provided.
|
static <R> Optional<R> |
resolveDetails(Throwable throwable)
Resolve details from the given
throwable , taking into account that the details may be available in any of
the HandlerExecutionException s is the "cause" chain. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public HandlerExecutionException(String message)
message
. The cause and application-specific details are set
to null
.message
- A message describing the exceptionpublic HandlerExecutionException(String message, Throwable cause)
message
and cause
. The application-specific details
are set to null
.message
- A message describing the exceptioncause
- the cause of the execution exceptionpublic HandlerExecutionException(String message, Throwable cause, Object details)
message
, cause
and application-specific
details
.message
- A message describing the exceptioncause
- The cause of the execution exceptiondetails
- An object providing application-specific details of the exceptionpublic HandlerExecutionException(String message, Throwable cause, Object details, boolean writableStackTrace)
message
, cause
, application-specific
details
, and writableStackTrace
message
- A message describing the exceptioncause
- The cause of the execution exceptiondetails
- An object providing application-specific details of the exceptionwritableStackTrace
- Whether the stack trace should be generated (true
) or not (false
)public static <R> Optional<R> resolveDetails(Throwable throwable)
throwable
, taking into account that the details may be available in any of
the HandlerExecutionException
s is the "cause" chain.R
- The type of details expectedthrowable
- The exception to resolve the details fromthrowable
public <R> Optional<R> getDetails()
ClassCastException
further
downstream, when accessing the Optional's enclosed value.R
- The type of details expectedCopyright © 2010–2024. All rights reserved.