Class HandlerNotRegisteredException
- Namespace
- Excalibur.Dispatch.Exceptions
- Assembly
- Excalibur.Dispatch.dll
Exception thrown when a message reaches the local bus with no handler registered for its type.
public sealed class HandlerNotRegisteredException : InvalidOperationException, ISerializable
- Inheritance
-
HandlerNotRegisteredException
- Implements
- Inherited Members
- Extension Methods
Remarks
A missing registration is a configuration fault, not a dispatch outcome: it cannot vary per request, every dispatch of that message type fails identically, and the caller cannot recover from it. Middleware that convert an exception into a failed result — retry, exception mapping, the circuit breaker — deliberately let this type through, so the fault reaches the host as a startup-shaped error instead of arriving at a caller who would map a failed result to a client error and blame the end user for the operator's omission. Retrying it is also wasted work: a registration absent on the first attempt is absent on the last.
It derives from InvalidOperationException so existing handling of an unconfigured dispatcher continues to catch it.
Constructors
HandlerNotRegisteredException()
Initializes a new instance of the HandlerNotRegisteredException class.
public HandlerNotRegisteredException()
HandlerNotRegisteredException(string)
Initializes a new instance of the HandlerNotRegisteredException class with a specified error message.
public HandlerNotRegisteredException(string message)
Parameters
messagestringThe error message that explains the reason for the exception.
HandlerNotRegisteredException(string, Exception)
Initializes a new instance of the HandlerNotRegisteredException class with a specified error message and a reference to the inner exception.
public HandlerNotRegisteredException(string message, Exception innerException)