Pomona.DefaultErrorHandler.UnwrapException C# (CSharp) Method

UnwrapException() protected method

protected UnwrapException ( Exception exception ) : Exception
exception System.Exception
return System.Exception
        protected virtual Exception UnwrapException(Exception exception)
        {
            if (exception is TargetInvocationException || exception is RequestExecutionException)
                return exception.InnerException != null ? UnwrapException(exception.InnerException) : exception;
            return exception;
        }