}
}
protected void displayTheError(Throwable t) {
// Get the error has been generated during the thread's execution.
ErrorReport report = ErrorReport.getCurrentThreadError();
if (report == null) report = ErrorManager.lookup().notifyError(t, true);
// Initialize the error handler bean.
ErrorReportHandler errorHandler = ErrorReportHandler.lookup();
errorHandler.setWidth(1000);
errorHandler.setHeight(400);
errorHandler.setErrorReport(report);
errorHandler.setCloseListener(new Runnable() {
public void run() {
ModalDialogComponent.lookup().hide();
}
});
// Display the error in a modal dialog window.
ModalDialogComponent modalDialog = ModalDialogComponent.lookup();
modalDialog.setTitle(report.printErrorTitle());
modalDialog.setCurrentComponent(errorHandler);
modalDialog.setCloseListener(new Runnable() {
public void run() {
ErrorReportHandler errorHandler = ErrorReportHandler.lookup();
errorHandler.setErrorReport(null);