DbExecutionStrategy.UnwrapAndHandleException<T> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
遞迴會從 exception
取得 InnerException,只要它是 EntityException , DbUpdateException 或 UpdateException 就會將其傳遞至 exceptionHandler
public static T UnwrapAndHandleException<T> (Exception exception, Func<Exception,T> exceptionHandler);
static member UnwrapAndHandleException : Exception * Func<Exception, 'T> -> 'T
類型參數
- T
未包裝例外狀況的類型。
參數
- exception
- Exception
要解除包裝的例外狀況。
傳回
T
的結果 exceptionHandler
。