[MacRuby] #820: raising alternative Exception object in rescue block does not work.
#820: raising alternative Exception object in rescue block does not work. --------------------------------+------------------------------------------- Reporter: chekenan@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: --------------------------------+------------------------------------------- When raise an Exception object in rescue block, the rescued object is raised. {{{ def mm raise RuntimeError, "original" end def m begin mm rescue RuntimeError puts "reached here" raise TypeError, "re-raise" end end m }}} Executed in both 1.9.2-rc2 and macruby-0.6, {{{ $ rvm 1.9.2,macruby test.rb info: 1.9.2 (ruby-1.9.2-rc2): ruby 1.9.2dev (2010-07-11 revision 28618) [x86_64-darwin10.4.0] does catched. a.rb:10:in `rescue in m': re-raise (TypeError) from a.rb:6:in `m' from a.rb:14:in `<main>' info: macruby (macruby-0.6): MacRuby version 0.6 (ruby 1.9.0) [universal- darwin10.0, x86_64] does catched. /Users/dche/Desktop/a.rb:2:in `mm': original (RuntimeError) from /Users/dche/Desktop/a.rb:7:in `m' from /Users/dche/Desktop/a.rb:14:in `<main>' }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/820> MacRuby <http://macruby.org/>
#820: raising alternative Exception object in rescue block does not work. --------------------------------+------------------------------------------- Reporter: chekenan@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.6 Component: MacRuby | Keywords: --------------------------------+------------------------------------------- Comment(by chekenan@…): Before run the test, I changed the message in rescue block from "reached here" to "does catched." Sorry about the possible confusing. -- Ticket URL: <http://www.macruby.org/trac/ticket/820#comment:1> MacRuby <http://macruby.org/>
#820: raising alternative Exception object in rescue block does not work. --------------------------------+------------------------------------------- Reporter: chekenan@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.7 Component: MacRuby | Resolution: fixed Keywords: | --------------------------------+------------------------------------------- Changes (by martinlagardette@…): * status: new => closed * resolution: => fixed * milestone: MacRuby 0.6 => MacRuby 0.7 Comment: Thanks for the report :-) Apparently this has already been fixed on trunk: {{{ $> macruby raise.rb reached here /private/tmp/raise.rb:7:in `m': re-raise (TypeError) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/820#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby