private void setupMouseHandler() { addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { showErrors(); } }); }
@Override public void errorLogCleared() { errorNotificationLabel.setVisible(false); } };
/** * Shows a local error dialog for displaying one exception * @param throwable The exception to be displayed */ public static void showErrorDialog(Throwable throwable) { ErrorLog errorLog = new ErrorLog(); if (throwable != null) { errorLog.logError(throwable); } ErrorLogPanel panel = new ErrorLogPanel(errorLog, null); JOptionPane.showMessageDialog(null, panel, "Error", JOptionPane.ERROR_MESSAGE); }
public <T extends Throwable> ErrorExplanation<? extends Throwable> getErrorExplanation(T throwable, boolean traverseCauses){ Throwable cause = throwable; // Works through an error and its causes trying to find an explainer to match do { // This factory is not going to be even vaguely related to the type of the original exception // if we have moved on to its causes // The explanation only cares about the cause - it forgets the original exception // so we can return an explanation for any throwable cause ErrorExplanationFactory fac = getFactory(cause); if (fac != null){ return fac.createExplanation(cause); } cause = cause.getCause(); }while (traverseCauses && cause != null); return new ErrorExplanation<>(throwable, throwable.getMessage()); // return the error itself }
public void fillLog() { textArea.setText(""); for (ErrorLog.ErrorLogEntry entry : errorLog.getEntries()) { textArea.append(entry.toString()); textArea.append( "---------------------------------------------------------------------------------------------------\n\n"); } }
public void handleError(Thread t, Throwable e) { logError(e); } }
private boolean handleSendErrorReport() { return errorReportHandler != null && errorReportHandler.sendErrorReport(errorLog); }
/** * Shows a local error dialog for displaying one exception * @param throwable The exception to be displayed */ public static void showErrorDialog(Throwable throwable) { ErrorLog errorLog = new ErrorLog(); errorLog.logError(throwable); ErrorLogPanel panel = new ErrorLogPanel(errorLog, null); JOptionPane.showMessageDialog(null, panel, "Error", JOptionPane.ERROR_MESSAGE); } }
public void fillLog() { textArea.setText(""); for (ErrorLog.ErrorLogEntry entry : errorLog.getEntries()) { textArea.append(entry.toString()); textArea.append( "---------------------------------------------------------------------------------------------------\n\n"); } }
public void handleError(Thread t, Throwable e) { logError(e); } }
public void errorLogCleared(ErrorLog errorLog) { setVisible(false); } };
private void setupMouseHandler() { addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { showErrors(); } }); }
private boolean handleSendErrorReport() { return errorReportHandler != null && errorReportHandler.sendErrorReport(errorLog); }
public void fillLog() { textArea.setText(""); for (ErrorLog.ErrorLogEntry entry : errorLog.getEntries()) { textArea.append(entry.toString()); textArea.append( "---------------------------------------------------------------------------------------------------\n\n"); } }
public void errorLogCleared(ErrorLog errorLog) { setVisible(false); } };
@Override public void errorLogged() { errorNotificationLabel.setVisible(true); }
public void errorLogged(ErrorLog errorLog) { setVisible(true); }