public static void showErrors(string msg, ICollection <Exception> exceptions)
 {
     if (exceptions.Count == 1)
     {
         foreach (Exception e in exceptions)
         {
             FiveOhThreeJiraException e503 = e as FiveOhThreeJiraException;
             XPathUtils.InvalidXmlDocumentException eXml = e as XPathUtils.InvalidXmlDocumentException;
             SoapException eSoap = e as SoapException;
             if (e503 != null)
             {
                 show503Error(e503, msg);
             }
             else if (eXml != null)
             {
                 showXmlDocumentError(eXml, msg);
             }
             else if (eSoap != null)
             {
                 showSoapError(eSoap, msg);
             }
             else
             {
                 showNonJira503Errors(exceptions, msg);
             }
             break;
         }
     }
     else
     {
         showNonJira503Errors(exceptions, msg);
     }
 }
 private static void show503Error(FiveOhThreeJiraException e503, string msg)
 {
     MessageBoxWithHtml.showError(
         Constants.ERROR_CAPTION,
         getJira503Description(e503.Server),
         () => Clipboard.SetText(getFullExceptionTextDetails(msg, e503)),
         null);
 }
        public static void showError(string msg, Exception e)
        {
            FiveOhThreeJiraException e503 = e as FiveOhThreeJiraException;

            XPathUtils.InvalidXmlDocumentException eXml = e as XPathUtils.InvalidXmlDocumentException;
            if (e503 != null)
            {
                show503Error(e503, msg);
            }
            else if (eXml != null)
            {
                showXmlDocumentError(eXml, msg);
            }
            else
            {
                string exceptionMessage = getExceptionMessage(e) + getExceptionDetailsLink("ex");
                MessageBoxWithHtml.showError(
                    Constants.ERROR_CAPTION,
                    (msg != null ? msg + "<br>\r\n<br>\r\n" : "") + exceptionMessage,
                    () => Clipboard.SetText(getFullExceptionTextDetails(msg, e)),
                    delegate { new ExceptionViewer(msg, e).ShowDialog(); });
            }
        }