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 showXmlDocumentError(XPathUtils.InvalidXmlDocumentException e, string msg) { MessageBoxWithHtml.showError( Constants.ERROR_CAPTION, e.Message + getExceptionDetailsLink("eXml"), () => Clipboard.SetText((msg != null ? msg + "\r\n\r\n" : "") + e.SourceDoc), delegate { new ExceptionViewer(e.SourceDoc, e).ShowDialog(); }); }
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(); }); } }