Kartverket.MetadataEditor.Areas.HelpPage.HelpPageSampleGenerator.UnwrapException C# (CSharp) Method

UnwrapException() static private method

static private UnwrapException ( Exception exception ) : Exception
exception System.Exception
return System.Exception
        internal static Exception UnwrapException(Exception exception)
        {
            AggregateException aggregateException = exception as AggregateException;
            if (aggregateException != null)
            {
                return aggregateException.Flatten().InnerException;
            }
            return exception;
        }