Issue Details (XML | Word | Printable)

Key: JRUBY-373
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Thomas E Enebo
Reporter: Ryan Bell
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

When an exception is raised from a within a rescue node, the global exception ($!) does not remain set.

Created: 23/Dec/06 12:11 AM   Updated: 30/Apr/07 03:12 AM   Resolved: 29/Dec/06 04:06 PM
Return to search
Component/s: None
Affects Version/s: JRuby 0.9.2
Fix Version/s: JRuby 0.9.8

Time Tracking:
Not Specified

File Attachments: 1. Text File raise.patch (3 kB)

Environment:
JRuby 9.2
Java 6


 Description  « Hide

Here's a script that demonstrates the error:

at_exit do
unless $!
puts %q{Shouldn't there be an exception}
end
end

begin
raise 'Error stuff'
rescue
raise
end



Ryan Bell added a comment - 24/Dec/06 02:15 AM

Here's a patch I have that seems to fix this bug. It also incorporates my fix for bug JRUBY-372 (http://jira.codehaus.org/browse/JRUBY-372).


Thomas E Enebo added a comment - 29/Dec/06 04:06 PM

Patch applied. Thanks Ryan (commit 2614)