ExecutionStrategy.CallOnWrappedException<TResult> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Recursively gets InnerException from exception
as long as it is an
exception created by Entity Framework and calls exceptionHandler
on the innermost one.
public static TResult CallOnWrappedException<TResult> (Exception exception, Func<Exception,TResult> exceptionHandler);
static member CallOnWrappedException : Exception * Func<Exception, 'Result> -> 'Result
Public Shared Function CallOnWrappedException(Of TResult) (exception As Exception, exceptionHandler As Func(Of Exception, TResult)) As TResult
Type Parameters
- TResult
The return type of exceptionHandler
.
Parameters
- exception
- Exception
The exception to be unwrapped.
A delegate that will be called with the unwrapped exception.
Returns
The result from exceptionHandler
.
Remarks
See Connection resiliency and database retries for more information and examples.
Applies to
Entity Framework