Hi all.
I'm using rspec to test an API which we support as Ruby but which is
written in Java. When a failure occurs, I get a backtrace like this:
A problem occurred (Java::Acme::LicenceException)
Java::Acme::LicenceException:
A problem occurred
com.acme.Widget.initialise(Widget.java:80)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:601)
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:440)
[... cutting the rest for brevity in email ...]
The real cause for the exception which I would like to read is in the
Java exception's cause... which normally would be on the stack trace,
but isn't. The suppressed exceptions might be useful too, of course...
I have tried adding -d to the JRuby command and --backtrace to the
rspec command, but neither of these appear to change the behaviour.
Is there any way to get this?
TX
P.S. Here's how I'm actually running it all, in case that matters:
<java fork="yes" classname="org.jruby.Main" failonerror="false">
<classpath refid="run-classpath" />
<env key="CI_REPORTS" value="@{reportdir}" />
<arg value="-d"/> <!-- seems to make no difference -->
<arg line="-S rspec"/>
<arg value="src/test/rspec"/> <!-- Path to root specs dir -->
<arg value="--backtrace"/> <!-- seems to make no difference -->
<arg line="--require ci/reporter/rake/rspec_loader"/>
<arg line="--format CI::Reporter::RSpecDoc"/>
<arg line="--format html --out"/> <arg value="@{reportdir}/specs.html"/>
</java>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email