Browse Source

#43398: always print stack trace for non-BuildException's.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@581076 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 17 years ago
parent
commit
14a2247a90
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      src/main/org/apache/tools/ant/DefaultLogger.java

+ 9
- 0
src/main/org/apache/tools/ant/DefaultLogger.java View File

@@ -149,6 +149,15 @@ public class DefaultLogger implements BuildLogger {
message.append(getBuildFailedMessage());
message.append(StringUtils.LINE_SEP);

while (error instanceof BuildException) { // #43398
Throwable cause = ((BuildException) error).getCause();
if (cause != null && cause.toString().equals(error.getMessage())) {
error = cause;
} else {
break;
}
}

if (Project.MSG_VERBOSE <= msgOutputLevel
|| !(error instanceof BuildException)) {
message.append(StringUtils.getStackTrace(error));


Loading…
Cancel
Save