Browse Source

Don't swallow exception information in P4Base

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@498961 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 18 years ago
parent
commit
0e5bf0d973
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java

+ 5
- 1
src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4Base.java View File

@@ -294,7 +294,11 @@ public abstract class P4Base extends org.apache.tools.ant.Task {
} catch (Exception e) { } catch (Exception e) {
String failMsg = "Problem exec'ing P4 command: " + e.getMessage(); String failMsg = "Problem exec'ing P4 command: " + e.getMessage();
if (failOnError) { if (failOnError) {
throw new BuildException(failMsg);
if (e instanceof BuildException) {
throw (BuildException) e;
} else {
throw new BuildException(failMsg, e);
}
} else { } else {
log(failMsg, Project.MSG_ERR); log(failMsg, Project.MSG_ERR);
} }


Loading…
Cancel
Save