Example #1
0
 public override string GetExtendedErrorInfo()
 {
     if (!this.IsASAzure || this.httpResponse == null)
     {
         return(string.Empty);
     }
     return(ASAzureUtility.GetExtendedErrorInfo(this.httpResponse));
 }
        internal static void ThrowConnectionException(WebException ex)
        {
            string text = ex.Message;

            if (ex.Response != null && ex.Response is HttpWebResponse)
            {
                HttpWebResponse httpWebResponse = (HttpWebResponse)ex.Response;
                string          text2           = httpWebResponse.Headers["x-ms-xmlaerror-extended"];
                if (!string.IsNullOrEmpty(text2))
                {
                    text = text2;
                }
                text = string.Format("{0}{1}", text, ASAzureUtility.GetExtendedErrorInfo(httpWebResponse));
            }
            throw new AdomdConnectionException(text, ex);
        }