Translates an exception from the rest of the pipeline.
public sealed class ExceptionMappingBehavior : IStuntBehavior
The behavior observes the call through Proceed. A synchronous failure is thrown
by the stunt. A faulted or stays a fault of
the returned awaitable, and Exception stays null.
The map receives that exception. A null result leaves the exception
unchanged. Any other instance replaces it. A replacement that wraps the original keeps
that original as its .
Pass swallow: true to let a null result complete the call with
the value from DefaultValueProvider. The switch defaults to off, so a null
result cannot turn a failure into a value. Pass the provider already used to register
custom defaults, or omit it to use a new one. Native AOT uses the typed factories the
stunt already registers.
Behaviors added before this one sit outside the translated call. Exceptions they throw are left alone.
kind:method, kind:property, kind:ctor. Press Esc to clear.ExceptionMappingBehavior(Func<Exception, Exception?>, Boolean, DefaultValueProvider?)Initializes the behavior.AppliesTo(IMethodInvocation)Translates every invocation the pipeline dispatches.Execute(IMethodInvocation, ExecuteHandler)Runs next through Proceed and applies map to a failure.