DbExecutionStrategy.UnwrapAndHandleException<T> Method

Definition

Recursively gets InnerException from exception as long as it's an EntityException, DbUpdateException or UpdateException and passes it to exceptionHandler

public static T UnwrapAndHandleException<T> (Exception exception, Func<Exception,T> exceptionHandler);
static member UnwrapAndHandleException : Exception * Func<Exception, 'T> -> 'T

Type Parameters

T

The type of the unwrapped exception.

Parameters

exception
Exception

The exception to be unwrapped.

exceptionHandler
Func<Exception,T>

A delegate that will be called with the unwrapped exception.

Returns

T

The result from exceptionHandler.

Applies to