- All Implemented Interfaces and Traits:
- MessageHandlerInterceptor<T>
@Slf4j
@CompileStatic
class QueryHandlerExceptionInterceptor<T extends Message<?>>
extends Object
implements MessageHandlerInterceptor<T>
Simplifies throwing a business exception from query handling code, making sure it is propagated back to the caller as a details field of Axon's QueryExecutionException
.
It logs the stacktrace of anticipated QueryExecutionException
at the debug level, which helps during development.
In case of unexpected exceptions, corresponding QueryExecutionException
is logged at the error level, and exception details are represented with RemoteHandlerException
instance.
exceptionId
property of RemoteHandlerException
instance can be used in other JVM for correlation via logging.