|
|
|
Punting issues from 1.1 RC2 to 1.1 final.
This is Java integration related and nontrivial...we're not going to have it ready for 1.1.
I encountered this with a real framework and implementation need. Do any workarounds exist?
I did not expect it to work, but I tried: begin The calling Java code still sees the thrown exception as an org.jruby.exceptions.RaiseException, which makes sense because you just raised an exception out of Ruby code. Adding link to documented impact and analysis with real framework and implementation need:
Can also use this to validate fix in addition to originally attached test case. This is improved lately by allowing Ruby code to catch and raise Java exceptions without wrapping them. However the unwrapping when coming out of JRuby API calls or out of scripting interfaces (BSF, javax.script) is more problematic; since on the Java side of things those APIs don't say they're throwing those exception types, code calling them can't catch them. The best we could do would be to put the actual Java exception inside the API's wrapper exception. I'm going to call this one fixed, since there's various workarounds, recent 1.1 releases have a lot better support for raising and rescuing Java exceptions directly, and future JRuby will certainly have no distinction between Ruby exceptions and Java exceptions.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
A better solution will come long-term with a move to "lightweights", where we will have no wrappers at all.