ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50749] <script> should unwrap ScriptException when reporting errors to the user
Date Thu, 10 Feb 2011 05:21:54 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50749

--- Comment #1 from Trejkaz (pen name) <trejkaz@trypticon.org> 2011-02-10 00:21:51 EST
---
Created an attachment (id=26631)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26631)
Sample build file

Attaching a trivial sample build script causing an error.  The root cause
message *is* included in the exception, but most users don't seem to scour it
too well, and stop at "ScriptException".


------------ Result of running a task normally:
$ ant run-normally
Buildfile: /Users/daniel/Desktop/Test/Ant/build.xml

run-normally:

BUILD FAILED
/Users/daniel/Desktop/Test/Ant/build.xml:10: Classname must not be null.

Total time: 0 seconds


------------ Result of running the same task via a script:
$ ant run-using-script
Buildfile: /Users/daniel/Desktop/Test/Ant/build.xml

run-using-script:

BUILD FAILED
/Users/daniel/Desktop/Test/Ant/build.xml:3: javax.script.ScriptException:
sun.org.mozilla.javascript.internal.WrappedException: Wrapped Classname must
not be null. (<Unknown source>#3) in <Unknown source> at line number 3
    at
com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:110)
    at
com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:124)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)
    at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
    at
org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:104)
    at
org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:68)
    at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:52)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
    at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
    at org.apache.tools.ant.Main.runBuild(Main.java:801)
    at org.apache.tools.ant.Main.startAnt(Main.java:218)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 0 seconds

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message