[MacRuby] #707: raising an exception inside a rescue raises the rescued exception instead of the new exception
#707: raising an exception inside a rescue raises the rescued exception instead of the new exception ---------------------------------------+------------------------------------ Reporter: thilo@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Hi while trying to setup a testsuite with mocha and bacon by using Eloy's mocha-on-bacon things fall apart because of the mentioned bug. Here some code to reproduce the bug: def test_catch_and_raise begin raise StandardError rescue raise Exception end end -- macruby 0.6 -- test_catch_and_raise => StandardError: StandardError -- ruby 1.9.1 test_catch_and_raise => Exception: Exception -- Ticket URL: <http://www.macruby.org/trac/ticket/707> MacRuby <http://macruby.org/>
#707: raising an exception inside a rescue raises the rescued exception instead of the new exception ---------------------------------------+------------------------------------ Reporter: thilo@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Comment(by lsansonetti@…): {{{ $ ./miniruby -e "begin; raise 'bad'; rescue; raise 'ok'; end" /Users/lrz/src/macruby-trunk/-e:1:in `<main>': bad (RuntimeError) }}} I bet it's related to the way we push/pop VM exceptions in the landing pad. -- Ticket URL: <http://www.macruby.org/trac/ticket/707#comment:1> MacRuby <http://macruby.org/>
#707: raising an exception inside a rescue raises the rescued exception instead of the new exception ---------------------------------------+------------------------------------ Reporter: thilo@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ---------------------------------------+------------------------------------ Comment(by lsansonetti@…): Added to test_vm in r4080. -- Ticket URL: <http://www.macruby.org/trac/ticket/707#comment:2> MacRuby <http://macruby.org/>
#707: raising an exception inside a rescue raises the rescued exception instead of the new exception ---------------------------------------+------------------------------------ Reporter: thilo@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------------+------------------------------------ Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.7 Comment: Should be fixed in r4090. -- Ticket URL: <http://www.macruby.org/trac/ticket/707#comment:3> MacRuby <http://macruby.org/>
#707: raising an exception inside a rescue raises the rescued exception instead of the new exception ---------------------------------------+------------------------------------ Reporter: thilo@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------------------+------------------------------------ Comment(by thilo@…): works, thx :) -- Ticket URL: <http://www.macruby.org/trac/ticket/707#comment:4> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby