private Exception ConvertException(Exception exception) { if (exception is ArgumentException) { return(TokenProviderHelper.ConvertException(this.requestUri, exception)); } if (exception is WebException) { return(TokenProviderHelper.ConvertWebException(this.requestUri, (WebException)exception)); } if (!(exception is IOException) || !this.requestTimedOut) { return(exception); } return(new TimeoutException(SRClient.OperationRequestTimedOut(base.OriginalTimeout), exception)); }
private static void ThrowException(Uri requestUri, Exception innerException) { throw TokenProviderHelper.ConvertException(requestUri, innerException); }