public static void showError(String title, String desc, Throwable e, Level level) { JXErrorPane.showDialog(this, new ErrorInfo(title, desc, null, null, e, level, null)); }
/** * <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); }
/** * <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); }
/** * <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); }
/** * <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); }
/** * <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); }
/** * <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 showFrame(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showFrame(null, ii); }
/** * <p>Constructs and shows the error dialog 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 dialog shown will be modal. Otherwise, this thread will * block until the error dialog 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 showDialog(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showDialog(null, ii); }
/** * <p>Constructs and shows the error dialog 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 dialog shown will be modal. Otherwise, this thread will * block until the error dialog 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 showDialog(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showDialog(null, ii); }
/** * <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 showFrame(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showFrame(null, ii); }
/** * <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 showFrame(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showFrame(null, ii); }
/** * <p>Constructs and shows the error dialog 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 dialog shown will be modal. Otherwise, this thread will * block until the error dialog 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 showDialog(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showDialog(null, ii); }
/** * <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 showFrame(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showFrame(null, ii); }
/** * <p>Constructs and shows the error dialog 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 dialog shown will be modal. Otherwise, this thread will * block until the error dialog 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 showDialog(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showDialog(null, ii); }
/** * <p>Constructs and shows the error dialog 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 dialog shown will be modal. Otherwise, this thread will * block until the error dialog 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 showDialog(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showDialog(null, ii); }
/** * <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 showFrame(Throwable e) { ErrorInfo ii = new ErrorInfo(null, null, null, null, e, null, null); showFrame(null, ii); }
@Override public ErrorInfo buildErrorInfo(Throwable t) { StringBuilder sb = new StringBuilder(); sb.append(StaticWidgetHelper.getSynaptixWidgetConstantsBundle().basicErrorMessage()).append("\n"); sb.append(StaticWidgetHelper.getSynaptixWidgetConstantsBundle().message()).append(" : ").append(t.getLocalizedMessage()); return new ErrorInfo(StaticWidgetHelper.getSynaptixWidgetConstantsBundle().error(), StaticWidgetHelper.getSynaptixWidgetConstantsBundle().basicErrorMessage(), null, null, t, ErrorLevel.SEVERE, null); } }
/** * Shows an error dialog for the given exception. * @param throwable the exception */ public static void showErrorDialog(final Throwable throwable) { // Catch any uncaught GUI Exceptions try { final ErrorInfo errorInfo = new ErrorInfo( textBundle.textFor("BaralgaMain.FatalError.Title"), //$NON-NLS-1$, textBundle.textFor("BaralgaMain.FatalError.Message", BaralgaMain.getLogFileName()), //$NON-NLS-1$, null, // detailedErrorMessage null, // category throwable, Level.SEVERE, null); JXErrorPane.showDialog(null, errorInfo); } catch (Exception innerEx) { log.error(innerEx.getLocalizedMessage(), innerEx); } }
public static void showErrorMessage(final String shortMessage, final String detailedMessage, final Throwable exception) { final Throwable presentedException = ErrorUtils.unwrapForPresentation(exception); if (exception == null) { showErrorMessage(shortMessage, detailedMessage); return; } final String finalDetailedMessage = detailedMessage == null ? "" : detailedMessage; final String finalShortMessage = shortMessage == null ? "" : shortMessage; final ErrorInfo info = new ErrorInfo(finalShortMessage, finalDetailedMessage, null, "error", presentedException, ErrorLevel.SEVERE, null); final JXErrorPane errorPane = new JXErrorPane(); errorPane.setErrorInfo(info); final JDialog dialog = JXErrorPane.createDialog(null, errorPane); centerOnScreen(dialog); JXErrorPane.setDefaultLocale(Locale.ENGLISH); dialog.setLocale(Locale.ENGLISH); dialog.setModal(true); dialog.setTitle(finalShortMessage); dialog.setVisible(true); dialog.toFront(); }
/** * Display a user friendly error frame. * * @param parent parent component * @param message message for user * @param cause exception cause */ public static void showErrorDialog(Component parent, String message, Throwable cause) { JXErrorPane pane = new JXErrorPane(); String details = "<pre>\n" + getDetails(cause) + "\n</pre>"; ErrorInfo info = new ErrorInfo(t("isisfish.error.errorpane.title"), t("isisfish.error.errorpane.htmlmessage", message), details, null, cause, null, null); pane.setErrorInfo(info); if (cause != null) { pane.setErrorReporter(new ErrorHelper()); } JXErrorPane.showDialog(parent, pane); }