@CompileStatic class RemoteHandlerException extends IdentifiedRuntimeException
Identifiable (command and query) handler exception with empty stacktrace by default.
This exception is intended to be used from Axon command and query handlers as details DTO object. It should be used primarily in scenarios for describing unexpected exceptions (for example, NullPointerException). For anticipated business exceptions, one should use DomainException hierarchy. For the usage example, take a look atCommandHandlerExceptionInterceptor
or
QueryHandlerExceptionInterceptor
Note the name similarity with Axon class - org.axonframework.messaging.RemoteHandlingException
. Do not confuse the two.
Type | Name and description |
---|---|
String |
exceptionMessage |
Properties inherited from class | Properties |
---|---|
class IdentifiedRuntimeException |
exceptionId |
Constructor and description |
---|
RemoteHandlerException() |
RemoteHandlerException(String exceptionId) |
RemoteHandlerException(String exceptionId, String message) |
RemoteHandlerException(String exceptionId, String message, Throwable cause) |
RemoteHandlerException(String exceptionId, String message, Throwable cause, boolean writableStackTrace) |
Type Params | Return Type | Name and description |
---|---|---|
|
String |
getMessage() Returns preserved exceptionMessage property instead of original message. |
Returns preserved exceptionMessage property instead of original message.
Main reason for this is that, for some unknown reason, exception message field is lost during serialization over Axon Server. By adding additional exceptionMessage property, and overriding getMessage() method, we can overcome this.Groovy Documentation