Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError raised when trying to propagate java Throwables using Thread.raise

arielvalentin opened this issue Sep 22, 2013 · 2 comments


Copy link

arielvalentin commented Sep 22, 2013

Here is an example script that reproduces the problem:

require 'java'

x = Thread.current
thread = {
  rescue Java::JavaLang::ClassNotFoundException => e
    x.raise e #results in TypeError
sleep 1

Example output:

→ ruby thread_raise_type_error.rb 
TypeError: exception object expected
                    raise at org/jruby/
  chained_1_rescue_line_6 at thread_raise_type_error.rb:8
                   (root) at thread_raise_type_error.rb:6
@enebo enebo added this to the JRuby milestone Feb 17, 2017
Copy link

enebo commented Feb 17, 2017

This appears to be have been fixed at some point in the past. Seemingly on both 1.7.x and 9k:

Unhandled Java exception: java.lang.ClassNotFoundException: not_real
java.lang.ClassNotFoundException: not_real

@enebo enebo closed this as completed Feb 17, 2017
Copy link

arielvalentin commented Feb 17, 2017

Thanks @enebo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants