Ben Browning created JRUBY-6641:
-----------------------------------
Summary: Java Exceptions Can Only Be Rescued if First in Exception
List When Running in Interpreted Mode
Key: JRUBY-6641
URL: https://jira.codehaus.org/browse/JRUBY-6641
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.7
Reporter: Ben Browning
Assignee: Thomas E Enebo
If you pass multiple exception classes to a rescue class and are running in
interpreted mode, Java exceptions can only be rescued if first in the list.
Example code to reproduce:
require 'java'
begin
java.sql.DriverManager.getConnection('jdbc:mysql:blah')
rescue StandardError, java.sql.SQLException => e
puts "Caught exception"
end
That should print "Caught exception" but instead prints the stack trace when
run as "jruby -X-C rescue.rb". If you reverse the order of the rescue
arguments, it prints "Caught exception" as expected.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email