Table of Contents

Interface IExceptionHandler

Namespace
Amazon.Runtime
Assembly
AWSSDK.Core.dll

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

executionContext IExecutionContext

The execution context, it contains the request and response context.

exception Exception

The 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

executionContext IExecutionContext

The execution context, it contains the request and response context.

exception Exception

The exception to handle.

Returns

Task<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.