public void handleError(Thread t, Throwable e) { logError(e); } }
private void fireSelectionChanged() { for (OWLSelectionModelListener listener : new ArrayList<OWLSelectionModelListener>(listeners)) { try { listener.selectionChanged(); } catch (Exception e) { logger.warn("BAD LISTENER: (" + listener.getClass().getSimpleName() + ") "); ProtegeApplication.getErrorLog().handleError(Thread.currentThread(), e); } } }
public void fillLog() { textArea.setText(""); for (ErrorLog.ErrorLogEntry entry : errorLog.getEntries()) { textArea.append(entry.toString()); textArea.append( "---------------------------------------------------------------------------------------------------\n\n"); } }
/** * 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 void actionPerformed(ActionEvent e) { if (handleSendErrorReport()) { ErrorLogPanel.this.errorLog.clear(); fillLog(); repaint(); } } }), BorderLayout.WEST);
private static void setupExceptionHandler() { errorLog = new ErrorLog(); Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { public void uncaughtException(Thread t, Throwable e) { errorLog.uncaughtException(t, e); logger.warn("Uncaught Exception in thread " + t.getName(), e); } }); }
public void logError(Throwable throwable) { logger.warn("Error logged", throwable); errorCount++; errors.add(new ErrorLogEntry(throwable)); if (errors.size() > MAX_NUMBER_OF_ERRORS) { errors.remove(0); } fireErrorLoggedEvent(); }
public void clear() { errors.clear(); fireErrorLogClearedEvent(); }
public ErrorNotificationLabel(ErrorLog errorLog, SendErrorReportHandler handler) { super(Icons.getIcon("error.png")); setToolTipText("Protege-Guard: Click to view errors"); setupMouseHandler(); listener = new ErrorLogListener() { public void errorLogged(ErrorLog errorLog) { setVisible(true); } public void errorLogCleared(ErrorLog errorLog) { setVisible(false); } }; errorLog.addListener(listener); setVisible(false); panel = new ErrorLogPanel(errorLog, handler); }
/** * 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 actionPerformed(ActionEvent e) { if (handleSendErrorReport()) { ErrorLogPanel.this.errorLog.clear(); fillLog(); repaint(); } } }), BorderLayout.WEST);
private static void setupExceptionHandler() { errorLog = new ErrorLog(); Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() { public void uncaughtException(Thread t, Throwable e) { errorLog.uncaughtException(t, e); logger.warn("Uncaught Exception in thread " + t.getName(), e); } }); }
public void logError(Throwable throwable) { logger.warn("Error logged", throwable); errorCount++; errors.add(new ErrorLogEntry(throwable)); if (errors.size() > MAX_NUMBER_OF_ERRORS) { errors.remove(0); } fireErrorLoggedEvent(); }
public void clear() { errors.clear(); fireErrorLogClearedEvent(); }
public ErrorNotificationLabel(ErrorLog errorLog, SendErrorReportHandler handler) { super(Icons.getIcon("error.png")); setToolTipText("Protege-Guard: Click to view errors"); setupMouseHandler(); listener = new ErrorLogListener() { public void errorLogged(ErrorLog errorLog) { setVisible(true); } public void errorLogCleared(ErrorLog errorLog) { setVisible(false); } }; errorLog.addListener(listener); setVisible(false); panel = new ErrorLogPanel(errorLog, handler); }
public void handleError(Thread t, Throwable e) { logError(e); } }
private void fireSelectionChanged() { for (OWLSelectionModelListener listener : new ArrayList<OWLSelectionModelListener>(listeners)) { try { listener.selectionChanged(); } catch (Exception e) { logger.warn("BAD LISTENER: (" + listener.getClass().getSimpleName() + ") "); ProtegeApplication.getErrorLog().handleError(Thread.currentThread(), e); } } }
public void actionPerformed(ActionEvent e) { if (handleSendErrorReport()) { ErrorLogPanel.this.errorLog.clear(); fillLog(); repaint(); } } }), BorderLayout.WEST);
public void fillLog() { textArea.setText(""); for (ErrorLog.ErrorLogEntry entry : errorLog.getEntries()) { textArea.append(entry.toString()); textArea.append( "---------------------------------------------------------------------------------------------------\n\n"); } }
public void uncaughtException(Thread t, Throwable e) { logError(e); }