You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by st...@apache.org on 2007/04/23 23:10:43 UTC
svn commit: r531599 -
/ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java
Author: stevel
Date: Mon Apr 23 14:10:42 2007
New Revision: 531599
URL: http://svn.apache.org/viewvc?view=rev&rev=531599
Log:
BuildExceptions get caught and rethrown
Modified:
ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java
Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java?view=diff&rev=531599&r1=531598&r2=531599
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/util/optional/JavaxScriptRunner.java Mon Apr 23 14:10:42 2007
@@ -95,7 +95,11 @@
}
// execute the script
return engine.invoke("eval", String.class, getScript());
+ } catch (BuildException be) {
+ //catch and rethrow build exceptions
+ throw be;
} catch (Exception be) {
+ //any other exception? Get its cause
Throwable t = be;
Throwable te = (Throwable) ReflectUtil.invoke(be, "getCause");
if (te != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org