You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I found a buggy behaviour about error handling. If the behaviour is expected, please close the issue.
Issue
Incorrect error class is rescued when the super class is Java::JavaLang::RuntimeException.
Sample Code
require 'java'
class MyError1 < Java::JavaLang::RuntimeException; end
class MyError2 < Java::JavaLang::RuntimeException; end
begin
raise MyError1.new("my_error1")
rescue MyError2 => e
puts "Why come here? error_class => #{e.class}, rescue MyError2."
puts "e.kind_of?(MyError1) #=> #{e.kind_of?(MyError1)}"
puts "e.kind_of?(MyError2) #=> #{e.kind_of?(MyError2)}"
end
Hello. I found a buggy behaviour about error handling. If the behaviour is expected, please close the issue.
Issue
Java::JavaLang::RuntimeException
.Sample Code
The result is ...
Environment
Provide at least:
jruby -v
) and command line (flags, JRUBY_OPTS, etc)jruby 9.0.4.0 (2.2.2) 2015-11-12 b9fb7aa Java HotSpot(TM) 64-Bit Server VM 25.92-b14 on 1.8.0_92-b14 +jit [darwin-x86_64]
uname -a
)Darwin o-05796-mac.local 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
Expected Behavior
MyError1
should not be rescued.The text was updated successfully, but these errors were encountered: