Browse Source

take failOnError into account

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@349629 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 19 years ago
parent
commit
e7418c4201
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/main/org/apache/tools/ant/taskdefs/LoadResource.java

+ 7
- 1
src/main/org/apache/tools/ant/taskdefs/LoadResource.java View File

@@ -116,7 +116,13 @@ public class LoadResource extends Task {
throw new BuildException("output property not defined");
}
if (!src.isExists()) {
throw new BuildException(src + " doesn't exist");
String message = src + " doesn't exist";
if (failOnError) {
throw new BuildException(message);
} else {
log(message, Project.MSG_ERR);
return;
}
}
InputStream is = null;
BufferedInputStream bis = null;


Loading…
Cancel
Save