Struct ResultHookFault
A fault caught while dispatching a result-returning hook (.Register(...) / .RegisterLocal(...))
for one hook context type. HookRegistry.FireAsync isolates a faulting
handler — it abstains and falls through to the next registration so one bad handler cannot break the hook
point — but that isolation is otherwise silent, which would let a veto-bearing handler (a successful result
carrying e.g. CanDie = false) that throws fail open to the host default with no trace. The host
observes these faults via PluginServer.Create(onResultHookFault: ...) to surface the failure in its
log, mirroring SubscriptionDeliveryFault for fire-and-forget subscriptions. Control flow is
unchanged: a faulted handler is still skipped and dispatch still falls through to the next registration.
public readonly record struct ResultHookFault : IEquatable<ResultHookFault>
- Implements
- Inherited Members
Constructors
ResultHookFault(Type, Exception)
A fault caught while dispatching a result-returning hook (.Register(...) / .RegisterLocal(...))
for one hook context type. HookRegistry.FireAsync isolates a faulting
handler — it abstains and falls through to the next registration so one bad handler cannot break the hook
point — but that isolation is otherwise silent, which would let a veto-bearing handler (a successful result
carrying e.g. CanDie = false) that throws fail open to the host default with no trace. The host
observes these faults via PluginServer.Create(onResultHookFault: ...) to surface the failure in its
log, mirroring SubscriptionDeliveryFault for fire-and-forget subscriptions. Control flow is
unchanged: a faulted handler is still skipped and dispatch still falls through to the next registration.
public ResultHookFault(Type EventType, Exception Exception)
Parameters
EventTypeTypeThe hook context/event type whose dispatch faulted.
ExceptionExceptionThe exception that was caught and isolated.
Properties
EventType
The hook context/event type whose dispatch faulted.
public Type EventType { get; init; }
Property Value
Exception
The exception that was caught and isolated.
public Exception Exception { get; init; }