Struct HandlingClause
- Namespace
- Kevlar
- Assembly
- Kevlar.dll
Decides whether an outcome is a handled failure. Custom reactive strategies receive the
active clause through a Use factory and should consult it instead of duplicating filters.
public readonly struct HandlingClause
- Inherited Members
Properties
Default
The default handling clause: ordinary errors, excluding cancellation, Kevlar fail-fast rejections, and fatal runtime exceptions.
public static HandlingClause Default { get; }
Property Value
IsContextAware
Whether this clause consults execution or strategy context.
public bool IsContextAware { get; }
Property Value
Methods
ShouldHandle<T>(in Outcome<T>)
Returns whether outcome is a handled failure.
public bool ShouldHandle<T>(in Outcome<T> outcome)
Parameters
outcomeOutcome<T>
Returns
Type Parameters
T
Remarks
This context-free overload cannot report predicate failures through execution diagnostics. Reactive strategies should use the overload that accepts KevlarContext.
ShouldHandle<T>(in Outcome<T>, KevlarContext, int, int)
Returns whether an outcome is handled for the active execution and strategy.
public bool ShouldHandle<T>(in Outcome<T> outcome, KevlarContext context, int attemptNumber = 0, int strategyIndex = -1)
Parameters
outcomeOutcome<T>contextKevlarContextattemptNumberintstrategyIndexint
Returns
Type Parameters
T