Antlr3.Build.Tasks.AntlrClassGenerationTask.IsFatalException C# (CSharp) Method

IsFatalException() private static method

private static IsFatalException ( Exception exception ) : bool
exception System.Exception
return bool
        private static bool IsFatalException(Exception exception)
        {
            while (exception != null)
            {
                if ((exception is OutOfMemoryException)
                    || (exception is InsufficientMemoryException)
                    || (exception is ThreadAbortException))
                {
                    return true;
                }

                if (!(exception is TypeInitializationException) && !(exception is TargetInvocationException))
                {
                    break;
                }

                exception = exception.InnerException;
            }

            return false;
        }
    }