Class NoHandlerForCommandException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.axonframework.common.AxonException
org.axonframework.common.AxonTransientException
org.axonframework.messaging.commandhandling.NoHandlerForCommandException
- All Implemented Interfaces:
Serializable
Exception indicating that no suitable command handler could be found for the given command.
As of 4.2, this exception has been moved to AxonTransientException, since (especially in a MicroServices
Architecture context) the handler may return. RetrySchedulers will now see this exception as retryable.
- Since:
- 0.5
- Author:
- Allard Buijze
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionNoHandlerForCommandException(String message) Initialize this exception with the givenmessage.NoHandlerForCommandException(CommandMessage commandMessage) Initialize this exception with a message describing the givenCommandMessage.NoHandlerForCommandException(CommandMessage message, Class<?> entityType) Initialize this exception with a message describing the givenCommandMessageand the givenentityType. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
NoHandlerForCommandException
Initialize this exception with the givenmessage.- Parameters:
message- The message describing the cause of the exception.
-
NoHandlerForCommandException
Initialize this exception with a message describing the givenCommandMessage. This constructor specifies in its message that missing parameters could be the culprit of finding a matching handler.- Parameters:
commandMessage- Thecommandfor which no handler was found.
-
NoHandlerForCommandException
Initialize this exception with a message describing the givenCommandMessageand the givenentityType.- Parameters:
message- TheCommandMessagethat was handled.entityType- TheClassof the entity that was expected to handle the command.
-