Skip to content

Class ResultHookFault

Namespace: DotBoxD.Plugins.Runtime
Assembly: DotBoxD.Plugins.dll

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 DotBoxD.Plugins.Runtime.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 sealed record ResultHookFault : IEquatable<ResultHookFault>

objectResultHookFault

IEquatable<ResultHookFault>

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

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 DotBoxD.Plugins.Runtime.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)

EventType Type

The hook context/event type whose dispatch faulted.

Exception Exception

The exception that was caught and isolated.

public Type EventType { get; init; }

Type

public Exception Exception { get; init; }

Exception