src/Shared/EntityFramework/Utilities/ExceptionExtensions.cs
// <summary>
// Determines whether the given exception requires additional context from the update pipeline (in other
// words, whether the exception should be wrapped in an UpdateException).
// </summary>
// <param name="e"> Exception to test. </param>
// <returns> true if exception should be wrapped; false otherwise </returns>
Determines whether the given exception requires additional context from the update pipeline (in other
words, whether the exception should be wrapped in an UpdateException).
Determines whether the given exception requires additional context from the update pipeline ( in other words whether the exception should be wrapped in an UpdateException ) .
public static bool RequiresContext(this Exception e)
        {
            if (!e.IsCatchableExceptionType())
            {
                return false;
            }
            return !(e is UpdateException) && !(e is ProviderIncompatibleException);
        }
public static bool RequiresContext ( this Exception e ) { if ( ! e . IsCatchableExceptionType ( ) ) { return false ; } return ! ( e is UpdateException ) && ! ( e is ProviderIncompatibleException ) ; }
Determines whether the given exception requires additional context from the update pipeline (in other
words, whether the exception should be wrapped in an UpdateException).
Determines whether the given exception requires additional context from the update pipeline ( in other words whether the exception should be wrapped in an UpdateException ) .
// if the exception isn't catchable, never wrap // update and incompatible provider exceptions already contain the necessary context
true if exception should be wrapped; false otherwise
true if exception should be wrapped ; false otherwise
Exception
this
e
Exception to test.
Exception to test .