Class UnhandledDomainEventException
- Namespace
- Excalibur.Domain.Exceptions
- Assembly
- Excalibur.Domain.dll
Thrown when an aggregate's event-application logic does not recognize a domain event type — a missing
switch arm in ApplyEventInternal. Enforces totality: an unrecognized event fails loud rather
than being silently ignored while the aggregate version still advances (which would rehydrate a state
that never legitimately existed).
public sealed class UnhandledDomainEventException : DomainException, ISerializable
- Inheritance
-
UnhandledDomainEventException
- Implements
- Inherited Members
Constructors
UnhandledDomainEventException()
Initializes a new instance of the UnhandledDomainEventException class with a default message.
public UnhandledDomainEventException()
UnhandledDomainEventException(string)
Initializes a new instance of the UnhandledDomainEventException class with a specified message.
public UnhandledDomainEventException(string message)
Parameters
messagestringA message describing the exception.
UnhandledDomainEventException(string, Exception?)
Initializes a new instance of the UnhandledDomainEventException class with a specified message and inner exception.
public UnhandledDomainEventException(string message, Exception? innerException)
Parameters
messagestringA message describing the exception.
innerExceptionExceptionThe exception that caused the current exception.
UnhandledDomainEventException(Type, Type)
Initializes a new instance of the UnhandledDomainEventException class.
public UnhandledDomainEventException(Type aggregateType, Type eventType)
Parameters
aggregateTypeTypeThe aggregate type whose apply logic did not handle the event.
eventTypeTypeThe unrecognized domain event type.
Properties
AggregateType
Gets the aggregate type whose apply logic did not handle the event, if known.
public Type? AggregateType { get; }
Property Value
EventType
Gets the unrecognized domain event type, if known.
public Type? EventType { get; }