[MacRuby] #1411: Timeout throws fatal exception
#1411: Timeout throws fatal exception ----------------------------------+----------------------------------------- Reporter: willuni@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: Timeout ----------------------------------+----------------------------------------- Timeout throws this error in my script: {{{ terminate called throwing an exceptionterminate called throwing an exceptionterminate called throwing an exceptionterminate called throwing an exceptionIllegal instruction: 4 }}} When I try it in macirb I get this: {{{ irb(main):017:0> begin irb(main):018:1> Timeout::timeout(2) { irb(main):019:2> sleep 10 irb(main):020:1> } irb(main):021:1> rescue Exception =>e irb(main):022:1> puts e.message irb(main):023:1> puts e.backtrace irb(main):024:0> end undefined method `reject!' for nil:NilClass /Users/fragmachine/Desktop/(irb):18:in `<main>' /usr/local/bin/macirb:55:in `block' /usr/local/bin/macirb:9:in `block' /usr/local/bin/macirb:7:in `<main>' => nil irb(main):025:0> }}} Any ideas what's going on? I'm new to macruby so could be a mistake on my part... Anyway, and help would be appreciated. -- Ticket URL: <http://www.macruby.org/trac/ticket/1411> MacRuby <http://macruby.org/>
#1411: Timeout throws fatal exception ----------------------------------+----------------------------------------- Reporter: willuni@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: Timeout ----------------------------------+----------------------------------------- Comment(by watson1978@…): It seems that Exception#backtrace returns nil when was raised an exception by Thread#raise from another thread. {{{ t = Thread.start { begin sleep 10 rescue Exception => e e.backtrace end } t.raise RuntimeError, "stop." p t.value }}} Result: {{{ $ ruby19 tt.rb ["tt.rb:3:in `sleep'", "tt.rb:3:in `block in <main>'"] $ macruby tt.rb nil }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1411#comment:1> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby