#428: AOT compiled script can't get rescued -------------------------------------+-------------------------------------- Reporter: mattaimone...@… | Owner: lsansone...@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: -------------------------------------+-------------------------------------- t.rb
{{{ begin require 't1' rescue Exception => e puts "oops let's continue even tho: #{e.message}" end puts 'done' }}} t1.rb {{{ class Foo < DoesNotExist end }}} {{{ $ macruby t.rb oops let's continue even tho: uninitialized constant DoesNotExist done }} Then compile t1.rb {{{ $ macrubyc -C t1.rb }}} now try again: {{{ $ macruby t.rb 2009-11-09 14:26:04.441 macruby[6041:903] *** Terminating app due to uncaught exception 'NameError', reason: 'uninitialized constant DoesNotExist' *** Call stack at first throw: ( 0 CoreFoundation 0x00007fff8454f5a4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x00007fff804e1313 objc_exception_throw + 45 2 libmacruby.dylib 0x0000000100179405 rb_vm_raise + 437 3 libmacruby.dylib 0x00000001000400d9 rb_exc_raise + 9 4 libmacruby.dylib 0x000000010003cbb4 rb_name_error + 260 5 libmacruby.dylib 0x000000010010a0d3 rb_mod_const_missing + 83 6 libmacruby.dylib 0x000000010015da9c rb_vm_call_with_cache2 + 4652 7 libmacruby.dylib 0x000000010011f749 rb_funcall + 425 8 libmacruby.dylib 0x0000000100109c86 rb_const_get_0 + 758 9 libmacruby.dylib 0x000000010017bc72 _ZL18rb_vm_const_lookupmmbb + 162 10 libmacruby.dylib 0x000000010017f255 rb_vm_get_const + 613 11 t1.rbo 0x000000010119adda MREP_E8A8218CC60A4CC58372196710D15355 + 122 12 t1.rbo 0x000000010119ad51 _GLOBAL__I_main.c + 9 13 ??? 0x00007fff5fc0d500 0x0 + 140734799860992 14 ??? 0x00007fff5fc0bcec 0x0 + 140734799854828 15 ??? 0x00007fff5fc0bda6 0x0 + 140734799855014 16 ??? 0x00007fff5fc08fbb 0x0 + 140734799843259 17 libSystem.B.dylib 0x00007fff84783d40 dlopen + 61 18 libmacruby.dylib 0x0000000100114c12 dln_load + 322 19 libmacruby.dylib 0x00000001000488f2 rb_require_safe + 466 20 libmacruby.dylib 0x000000010016c030 rb_vm_dispatch + 7648 21 ??? 0x0000000101100065 0x0 + 4312793189 22 libmacruby.dylib 0x00000001000402f9 ruby_run_node + 73 23 macruby 0x0000000100000dd8 main + 152 24 macruby 0x0000000100000d34 start + 52 ) terminate called after throwing an instance of 'NSException' Abort trap }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/428> MacRuby <http://macruby.org/> _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel