Interrupt ignores exception message #4286

jeremyevans opened this Issue Nov 14, 2016 · 4 comments


None yet

3 participants



jruby (2.3.1) 2016-11-09 0150a76 OpenJDK 64-Bit Server VM 25.72-b15 on 1.8.0_72-b15 +jit [OpenBSD-x86_64]

Expected Behavior

With code:

$ jruby -e 'begin; raise Interrupt, "foo"; rescue Exception; puts $!.message; end'

I expect output will be foo, as that is MRI's behavior and the behavior of earlier JRuby versions. Example with ruby 2.3:

$ ruby23 -e 'begin; raise Interrupt, "foo"; rescue Exception; puts $!.message; end'

Actual Behavior

$ jruby -e 'begin; raise Interrupt, "foo"; rescue Exception; puts $!.message; end'

While I'm understandably not relying on this behavior in production, it did break Sequel's tests. I believe this behavior changed between and

@enebo enebo added this to the JRuby milestone Nov 14, 2016
headius commented Nov 14, 2016


enebo commented Nov 14, 2016

Single arg works as expected:

jruby -e 'begin; raise "foo"; rescue Exception; puts $!.message; end'

This appears to be specific to Interrupt, as raise "foo" (StandardError), and raise Exception, "foo" both work correctly.

@enebo enebo closed this in ddbc53b Nov 30, 2016
enebo commented Nov 30, 2016

Looks like we were not calling the new RubySignalException classes version of initialize and therefore were not setting the message. raise on down seems like it could use some cleanup. I found figuring this out above average difficulty...

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