Skip to content

Commit

Permalink
MONDRIAN: Improve TUI error message for exceptions.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 3240]
  • Loading branch information
ebb committed Feb 22, 2005
1 parent 91ea0d9 commit d704d80
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/mondrian/tui/CmdRunner.java
Expand Up @@ -75,10 +75,12 @@ void clearError() {
this.stack = null;
}

private String formatError(Throwable mex) {
String message = mex.getMessage();
if (mex.getCause() != null && mex.getCause() != mex)
message = message + "\n" + formatError(mex.getCause());
private String formatError(Throwable t) {
String message = t.getMessage();
if (message == null)
message = t.toString();
if (t.getCause() != null && t.getCause() != t)
message = message + "\n" + formatError(t.getCause());
return message;
}

Expand Down

0 comments on commit d704d80

Please sign in to comment.