Interface IExceptionHandler
The interface for an exception handler.
public interface IExceptionHandler
Methods
Handle(IExecutionContext, Exception)
Handles an exception for the given execution context.
bool Handle(IExecutionContext executionContext, Exception exception)
Parameters
executionContextIExecutionContextThe execution context, it contains the request and response context.
exceptionExceptionThe exception to handle.
Returns
- bool
Returns a boolean value which indicates if the original exception should be rethrown. This method can also throw a new exception to replace the original exception.
HandleAsync(IExecutionContext, Exception)
Handles an exception for the given execution context.
Task<bool> HandleAsync(IExecutionContext executionContext, Exception exception)
Parameters
executionContextIExecutionContextThe execution context, it contains the request and response context.
exceptionExceptionThe exception to handle.