Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Was attempting to perform the Ruby equivalent of wrapping a message. In this case just adding a bit more info before re-raising the exception. The code snippet below creates raises an unpected "allocator undefined for NativeException" in the rescue block.
rescue Exception => e
tx.rollback if tx
raise e.exception("#{e.message}: while parsing chunk '#{chunked_stream}'")
ensure
session.close
end
The work-around was to log and raise the Java exception unmodified. Nothing painful, but I would like the #exception method to work the same on Ruby and Java exceptions. In my case I am working with highly threaded code and having interleaved error messages a bit difficult to tease apart.
Issue Links
- relates to
-
JRUBY-415
All Java classes bound into Ruby should provide an allocator/initialize combo or documentation why they do not
-
What's causing the native exception? I can't reproduce the problem you are describing with the information at hand.