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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]