CSharpAnalytics.Network.BackgroundHttpRequester.GetInnermostException C# (CSharp) Method

GetInnermostException() protected static method

Obtain the innermost Exception from within an Exception.
protected static GetInnermostException ( Exception ex ) : Exception
ex System.Exception Exception to obtain the innermost exception from.
return System.Exception
        protected static Exception GetInnermostException(Exception ex)
        {
            var nextException = ex;
            while (nextException.InnerException != null)
                nextException = nextException.InnerException;
            return nextException;
        }