Class QueryExecutionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.common.AxonException
org.axonframework.messaging.core.HandlerExecutionException
org.axonframework.messaging.queryhandling.QueryExecutionException
- All Implemented Interfaces:
Serializable
Exception indicating that the execution of a Query Handler has resulted in an exception.
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:
- 3.1.0
- Author:
- Marc Gathier
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionQueryExecutionException(String message, @Nullable Throwable cause) Initializes the exception with givenmessageandcauseQueryExecutionException(String message, Throwable cause, @Nullable Object details) Initializes the exception with givenmessage,causeanddetails.QueryExecutionException(String message, Throwable cause, @Nullable Object details, boolean writableStackTrace) Initializes the exception with givenmessage,cause,detailsandwritableStackTraceQueryExecutionException(String message, Throwable cause, @Nullable Object details, @Nullable Converter converter, boolean writableStackTrace) Initializes the exception with givenmessage,cause,details, aconverter, andwritableStackTrace. -
Method Summary
Methods inherited from class org.axonframework.messaging.core.HandlerExecutionException
getDetails, getDetails, getDetails, getDetails, getDetails, getDetails, getDetails, resolveDetailsMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
QueryExecutionException
Initializes the exception with givenmessageandcause- Parameters:
message- message explaining the context of the errorcause- the underlying cause of the invocation failure
-
QueryExecutionException
Initializes the exception with givenmessage,causeanddetails.- Parameters:
message- message explaining the context of the errorcause- the underlying cause of the invocation failuredetails- an object providing more error details (might benull)
-
QueryExecutionException
public QueryExecutionException(String message, Throwable cause, @Nullable Object details, boolean writableStackTrace) Initializes the exception with givenmessage,cause,detailsandwritableStackTrace- Parameters:
message- message explaining the context of the errorcause- the underlying cause of the invocation failuredetails- an object providing more error details (might benull)writableStackTrace- whether the stack trace should be generated (true) or not (false)
-
QueryExecutionException
@Internal public QueryExecutionException(String message, Throwable cause, @Nullable Object details, @Nullable Converter converter, boolean writableStackTrace) Initializes the exception with givenmessage,cause,details, aconverter, andwritableStackTrace. This constructor is used by messaging infrastructure to attach aConverterwhen reconstructingdetailsfrom raw data received over an infrastructure boundary (for example, a query dispatched through Axon Server). It is not meant to be used directly by application code, which typically already has the details object in its final form and can useQueryExecutionException(String, Throwable, Object)instead.- Parameters:
message- message explaining the context of the errorcause- the underlying cause of the invocation failuredetails- an object providing more error details, potentially raw data awaiting conversion (may benull)converter- theConverterto lazily apply whenHandlerExecutionException.getDetails(Class)is called with a typedetailsdoes not already match, ornullif no such conversion is availablewritableStackTrace- whether the stack trace should be generated (true) or not (false)
-