ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r349629 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadResource.java
Date Tue, 29 Nov 2005 04:36:01 GMT
Author: bodewig
Date: Mon Nov 28 20:35:59 2005
New Revision: 349629

URL: http://svn.apache.org/viewcvs?rev=349629&view=rev
Log:
take failOnError into account

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadResource.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadResource.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadResource.java?rev=349629&r1=349628&r2=349629&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadResource.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/LoadResource.java Mon Nov 28 20:35:59
2005
@@ -116,7 +116,13 @@
             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;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message