Table of Contents

Class RequestExceptionHandlerState<TResponse>

Namespace
Caesar.Pipeline
Assembly
Caesar.Abstractions.dll

Tracks whether an exception was handled and which response to return in its place.

public sealed class RequestExceptionHandlerState<TResponse>

Type Parameters

TResponse

The response type.

Inheritance
RequestExceptionHandlerState<TResponse>
Inherited Members

Constructors

RequestExceptionHandlerState()

public RequestExceptionHandlerState()

Properties

Handled

true once a handler called SetHandled(TResponse).

public bool Handled { get; }

Property Value

bool

Response

The fallback response supplied via SetHandled(TResponse).

public TResponse? Response { get; }

Property Value

TResponse

Methods

SetHandled(TResponse)

Marks the exception as handled and stores the response to return.

public void SetHandled(TResponse response)

Parameters

response TResponse

The response to return instead of throwing.