Here is an example script that reproduces the problem:
require'java'x=Thread.currentthread=Thread.new{beginJava::JavaLang::Class.for_name('not_real')rescueJava::JavaLang::ClassNotFoundException=>ex.raisee#results in TypeErrorend}sleep1
Example output:
→ ruby thread_raise_type_error.rb
TypeError: exception object expected
raise at org/jruby/RubyThread.java:858
chained_1_rescue_line_6 at thread_raise_type_error.rb:8
(root) at thread_raise_type_error.rb:6
The text was updated successfully, but these errors were encountered:
arielvalentin commentedSep 22, 2013
Here is an example script that reproduces the problem:
Example output:
The text was updated successfully, but these errors were encountered: