Class ExceptionCatcherHandler
Catches unhandled exception thrown by the encapsulated handler.
Implements
Inherited Members
Namespace: Solti.Utils.Rpc.Pipeline
Assembly: Solti.Utils.Rpc.Server.dll
Syntax
public class ExceptionCatcherHandler : RequestHandlerBase<IExceptionCatcherHandlerConfig>, IRequestHandler
Constructors
ExceptionCatcherHandler(IRequestHandler, IExceptionCatcherHandlerConfig)
Creates a new ExceptionCatcherHandler instance.
Declaration
public ExceptionCatcherHandler(IRequestHandler next, IExceptionCatcherHandlerConfig config)
Parameters
| Type | Name | Description |
|---|---|---|
| IRequestHandler | next | |
| IExceptionCatcherHandlerConfig | config |
Remarks
This handler requires a next value to be supplied.
Methods
HandleAsync(IInjector, IHttpSession, CancellationToken)
Does some handler specific work.
Declaration
public override async Task HandleAsync(IInjector scope, IHttpSession context, CancellationToken cancellation)
Parameters
| Type | Name | Description |
|---|---|---|
| Solti.Utils.DI.Interfaces.IInjector | scope | |
| IHttpSession | context | |
| CancellationToken | cancellation |
Returns
| Type | Description |
|---|---|
| Task |
Overrides
Solti.Utils.Rpc.Pipeline.RequestHandlerBase<Solti.Utils.Rpc.Pipeline.IExceptionCatcherHandlerConfig>.HandleAsync(Solti.Utils.DI.Interfaces.IInjector, Solti.Utils.Rpc.Interfaces.IHttpSession, System.Threading.CancellationToken)
ProcessUnhandledException(Exception, IHttpSession)
Processes unhandled exceptions.
Declaration
protected virtual async Task ProcessUnhandledException(Exception ex, IHttpSession context)
Parameters
| Type | Name | Description |
|---|---|---|
| Exception | ex | |
| IHttpSession | context |
Returns
| Type | Description |
|---|---|
| Task |