Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
exceptions thrown by Ruby not propagated to calling Ruby when some Java involved in between #2232
It seems that exceptions thrown by Ruby code are not propagated to the calling Ruby method when some Java code is involved in between.
Run the test:
$ git clone firstname.lastname@example.org:gmalkas/jruby-uncaught-exception-issue.git && cd jruby-uncaught-exception-issue $ bundle && ./not_working.rb
The previous code should print
On the other hand, if the rescuing Ruby code is calling the failing code directly (without involving Java code), it works as expected: https://github.com/gmalkas/jruby-uncaught-exception-issue/blob/master/working.rb
Let me know if you need any additional information.