You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by tw...@apache.org on 2007/07/09 11:37:39 UTC
svn commit: r554583 -
/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java
Author: twgoetz
Date: Mon Jul 9 02:37:38 2007
New Revision: 554583
URL: http://svn.apache.org/viewvc?view=rev&rev=554583
Log:
Jira UIMA-488: add message display for java.lang.Error.
https://issues.apache.org/jira/browse/UIMA-488
Modified:
incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java
Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java?view=diff&rev=554583&r1=554582&r2=554583
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/cvd/MainFrame.java Mon Jul 9 02:37:38 2007
@@ -560,18 +560,17 @@
}
protected void handleException(Throwable e, StringBuffer msg) {
- if (e.getMessage() == null) {
- msg.append(e.getClass().getName());
- } else {
+ msg.append(e.getClass().getName() + ": ");
+ if (e.getMessage() != null) {
msg.append(e.getMessage());
}
if (this.log != null) {
if (e instanceof Exception) {
this.log.log(Level.SEVERE, ((Exception) e).getLocalizedMessage(), e);
- msg.append("\nMore detailed information is in the log file.");
- } else if (e instanceof Error) {
- this.log.log(Level.SEVERE, ((Error) e).getMessage(), e);
+ } else {
+ this.log.log(Level.SEVERE, e.getMessage(), e);
}
+ msg.append("\nMore detailed information is in the log file.");
}
boolean hasAsserts = false;
// assert(hasAsserts = true);
@@ -1571,6 +1570,11 @@
this.sofaSelectionPanel.setVisible(nonDefaultSofaFound);
} catch (Exception e) {
handleException(e);
+ } catch (Error e) {
+ StringBuffer buf = new StringBuffer();
+ buf.append("A severe error has occured:\n");
+ handleException(e, buf);
+ throw e;
}
}