YAXLib.YAXSerializer.OnExceptionOccurred C# (CSharp) Method

OnExceptionOccurred() private method

Called when an exception occurs inside the library. It applies the exception handling policies.
private OnExceptionOccurred ( YAXException ex, YAXExceptionTypes exceptionType ) : void
ex YAXException The exception that has occurred.
exceptionType YAXExceptionTypes Type of the exception.
return void
        private void OnExceptionOccurred(YAXException ex, YAXExceptionTypes exceptionType)
        {
            m_exceptionOccurredDuringMemberDeserialization = true;
            if (exceptionType == YAXExceptionTypes.Ignore)
            {
                return;
            }

            m_parsingErrors.AddException(ex, exceptionType);
            if ((m_exceptionPolicy == YAXExceptionHandlingPolicies.ThrowWarningsAndErrors) ||
                (m_exceptionPolicy == YAXExceptionHandlingPolicies.ThrowErrorsOnly && exceptionType == YAXExceptionTypes.Error))
            {
                throw ex;
            }
        }