DbExecutionStrategy.UnwrapAndHandleException<T> Method (Exception, Func<Exception, T>)
Recursively gets InnerException from exception as long as it is an EntityException, DbUpdateException or UpdateException and passes it to exceptionHandler.
Assembly: EntityFramework (in EntityFramework.dll)
public static T UnwrapAndHandleException<T>( Exception exception, Func<Exception, T> exceptionHandler )
Parameters
- exception
-
Type:
System.Exception
The exception to be unwrapped.
- exceptionHandler
-
Type:
System.Func<Exception, T>
A delegate that will be called with the unwrapped exception.
Type Parameters
- T
The type of the unwrapped exception.