public static void showError(String title, String desc, Throwable e, Level level) { JXErrorPane.showDialog(this, new ErrorInfo(title, desc, null, null, e, level, null)); }
if (defaultStateErrorInfo != null) { Map<String, String> state = new HashMap<String, String>(); state.putAll(errorInfo.getState()); Map<String, String> s = defaultStateErrorInfo.getDefaultState(); if (s != null) { state.putAll(s); errorInfo = new ErrorInfo(errorInfo.getTitle(), errorInfo.getBasicErrorMessage(), errorInfo.getDetailedErrorMessage(), errorInfo.getCategory(), errorInfo.getErrorException(), errorInfo.getErrorLevel(), state);
@Override public void reportError(ErrorInfo errorInfo) throws NullPointerException { showErrorDialog(errorInfo.getBasicErrorMessage(), errorInfo.getErrorException()); }
if(errorInfo.getErrorException() != null) { html.append("<h2>" + escapeXml(errorInfo.getTitle()) + "</h2>"); html.append("<HR size='1' noshade>"); html.append("<div></div>"); html.append("<b>Message:</b>"); html.append("<pre>"); html.append(" " + escapeXml(errorInfo.getErrorException().toString())); html.append("</pre>"); html.append("<b>Level:</b>"); html.append("<pre>"); html.append(" " + errorInfo.getErrorLevel()); html.append("</pre>"); html.append("<b>Stack Trace:</b>"); Throwable ex = errorInfo.getErrorException(); while(ex != null) { html.append("<h4>"+ex.getMessage()+"</h4>");
if (errorInfo.getErrorLevel() == ErrorLevel.FATAL) { closeButton.setText(UIManagerExt.getString( CLASS_NAME + ".fatal_button_text", closeButton.getLocale())); if (errorInfo.getErrorLevel().intValue() <= Level.WARNING.intValue()) { icon = getDefaultWarningIcon(); } else { setErrorMessage(errorInfo.getBasicErrorMessage()); String details = errorInfo.getDetailedErrorMessage(); if(details == null) { details = getDetailsAsHTML(errorInfo);
/** * {@inheritDoc} */ protected void reinit() { super.reinit(); ErrorInfo info = pane == null ? null : pane.getErrorInfo(); titleLabel.setText(info == null ? "Unknown Error" : info.getTitle()); Object finePrint = pane.getClientProperty("fine-print"); String text = finePrint == null ? null : finePrint.toString(); disclaimerText.setText(text); disclaimerText.setVisible(text != null); if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) { closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".fatal_button_text", closeButton.getLocale())); } else { closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".ok_button_text", closeButton.getLocale())); } }
public JXErrorFrame(JXErrorPane p) { setTitle(p.getErrorInfo().getTitle()); initWindow(this, p); } }
message += formatMessage("Title", errorInfo.getTitle()); message += formatMessage("Description", errorInfo.getBasicErrorMessage().replaceAll("<[^>]+>", "")); message += formatMessage("Exception", getDetails(errorInfo.getErrorException()));
private void exitIfFatal() { ErrorInfo info = pane.getErrorInfo(); // FYI: info can be null if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) { Action fatalAction = pane.getActionMap().get(JXErrorPane.FATAL_ACTION_KEY); if (fatalAction == null) { System.exit(1); } else { ActionEvent ae = new ActionEvent(closeButton, -1, "fatal"); fatalAction.actionPerformed(ae); } } }
if(errorInfo.getErrorException() != null) { html.append("<h2>" + escapeXml(errorInfo.getTitle()) + "</h2>"); html.append("<HR size='1' noshade>"); html.append("<div></div>"); html.append("<b>Message:</b>"); html.append("<pre>"); html.append(" " + escapeXml(errorInfo.getErrorException().toString())); html.append("</pre>"); html.append("<b>Level:</b>"); html.append("<pre>"); html.append(" " + errorInfo.getErrorLevel()); html.append("</pre>"); html.append("<b>Stack Trace:</b>"); Throwable ex = errorInfo.getErrorException(); while(ex != null) { html.append("<h4>"+ex.getMessage()+"</h4>");
if (errorInfo.getErrorLevel() == ErrorLevel.FATAL) { closeButton.setText(UIManagerExt.getString( CLASS_NAME + ".fatal_button_text", closeButton.getLocale())); if (errorInfo.getErrorLevel().intValue() <= Level.WARNING.intValue()) { icon = getDefaultWarningIcon(); } else { setErrorMessage(errorInfo.getBasicErrorMessage()); String details = errorInfo.getDetailedErrorMessage(); if(details == null) { details = getDetailsAsHTML(errorInfo);
/** * {@inheritDoc} */ @Override protected void reinit() { super.reinit(); ErrorInfo info = pane == null ? null : pane.getErrorInfo(); titleLabel.setText(info == null ? "Unknown Error" : info.getTitle()); Object finePrint = pane.getClientProperty("fine-print"); String text = finePrint == null ? null : finePrint.toString(); disclaimerText.setText(text); disclaimerText.setVisible(text != null); if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) { closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".fatal_button_text", closeButton.getLocale())); } else { closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".ok_button_text", closeButton.getLocale())); } }
public JXErrorFrame(JXErrorPane p) { setTitle(p.getErrorInfo().getTitle()); initWindow(this, p); } }
private void exitIfFatal() { ErrorInfo info = pane.getErrorInfo(); // FYI: info can be null if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) { Action fatalAction = pane.getActionMap().get(JXErrorPane.FATAL_ACTION_KEY); if (fatalAction == null) { System.exit(1); } else { ActionEvent ae = new ActionEvent(closeButton, -1, "fatal"); fatalAction.actionPerformed(ae); } } }
/** * <p>Constructs and shows the error frame for the given exception. The * exceptions message will be the errorMessage, and the stacktrace will form * the details for the error dialog.</p> * * <p>This method may be called from any thread. It will actually show the error * dialog on the AWT event dispatch thread. This method blocks. If called * on the EDT, the frame shown will be modal. Otherwise, this thread will * block until the error frame has been shown and hidden on the EDT.</p> * * @param e Exception that contains information about the error cause and stack trace */ public static void showInternalFrame(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showInternalFrame(null, ii); }
if(errorInfo.getErrorException() != null) { html.append("<h2>" + escapeXml(errorInfo.getTitle()) + "</h2>"); html.append("<HR size='1' noshade>"); html.append("<div></div>"); html.append("<b>Message:</b>"); html.append("<pre>"); html.append(" " + escapeXml(errorInfo.getErrorException().toString())); html.append("</pre>"); html.append("<b>Level:</b>"); html.append("<pre>"); html.append(" " + errorInfo.getErrorLevel()); html.append("</pre>"); html.append("<b>Stack Trace:</b>"); Throwable ex = errorInfo.getErrorException(); while(ex != null) { html.append("<h4>"+ex.getMessage()+"</h4>");
if (errorInfo.getErrorLevel() == ErrorLevel.FATAL) { closeButton.setText(UIManagerExt.getString( CLASS_NAME + ".fatal_button_text", closeButton.getLocale())); if (errorInfo.getErrorLevel().intValue() <= Level.WARNING.intValue()) { icon = getDefaultWarningIcon(); } else { setErrorMessage(errorInfo.getBasicErrorMessage()); String details = errorInfo.getDetailedErrorMessage(); if(details == null) { details = getDetailsAsHTML(errorInfo);
/** * {@inheritDoc} */ @Override protected void reinit() { super.reinit(); ErrorInfo info = pane == null ? null : pane.getErrorInfo(); titleLabel.setText(info == null ? "Unknown Error" : info.getTitle()); Object finePrint = pane.getClientProperty("fine-print"); String text = finePrint == null ? null : finePrint.toString(); disclaimerText.setText(text); disclaimerText.setVisible(text != null); if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) { closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".fatal_button_text", closeButton.getLocale())); } else { closeButton.setText(UIManagerExt.getString(CLASS_NAME + ".ok_button_text", closeButton.getLocale())); } }
public JXErrorFrame(JXErrorPane p) { setTitle(p.getErrorInfo().getTitle()); initWindow(this, p); } }
private void exitIfFatal() { ErrorInfo info = pane.getErrorInfo(); // FYI: info can be null if (info != null && info.getErrorLevel() == ErrorLevel.FATAL) { Action fatalAction = pane.getActionMap().get(JXErrorPane.FATAL_ACTION_KEY); if (fatalAction == null) { System.exit(1); } else { ActionEvent ae = new ActionEvent(closeButton, -1, "fatal"); fatalAction.actionPerformed(ae); } } }