Class DelegateExceptionHandler
Exception handler that uses a delegate to handle the exception
Implements
Namespace: Seltzr.ExceptionHandlers
Assembly: Seltzr.dll
Syntax
C#
public class DelegateExceptionHandler : IExceptionHandler
Constructors
|
Improve this Doc
View Source
DelegateExceptionHandler(Func<Exception, HttpContext, Boolean, Task<Nullable<Boolean>>>)
Initializes a new instance of the DelegateExceptionHandler class
C#
public DelegateExceptionHandler(Func<Exception, HttpContext, bool, Task<bool?>> handler)
Parameters
Methods
Handles API exceptions
C#
public Task<bool?> HandleException(Exception exception, HttpContext context, bool hasNext)
Parameters
exception
Exception
The exception that was thrown
context
HttpContext
The current request context
hasNext
Boolean
true if there is another middleware registered for this route, false otherwise
Returns
true if the request should continue and attempt to use the next middleware registered for this route, false to halt request execution,
C#
null
to continue with the next exception handler.