IsRecoverableException Method
Definition
IsRecoverableException(Exception)
Determines whether the specified exception is considered recoverable and can be safely caught.
public static bool IsRecoverableException(Exception exception)
Parameters
exceptionExceptionThe exception to evaluate.
Returns
- bool
trueifexceptionis not considered fatal; otherwise,false.
Remarks
Designed for use as an exception filter: catch (Exception ex) when (Patterns.IsRecoverableException(ex)) to avoid double-negation.