diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-07 01:45:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-09-07 01:45:40 +0000 |
commit | 4b3dd4e55f9974bcd753ecd4849c0134f1b72225 (patch) | |
tree | c64b6ab1658e1d0300f4d5bd1584af3eb4a2a53f /eval.c | |
parent | 5529743dcc6d11bad9024d8ea210ef34ab399e71 (diff) | |
download | ruby-4b3dd4e55f9974bcd753ecd4849c0134f1b72225.tar.gz ruby-4b3dd4e55f9974bcd753ecd4849c0134f1b72225.tar.xz ruby-4b3dd4e55f9974bcd753ecd4849c0134f1b72225.zip |
* eval.c (rb_thread_switch): convert all exceptions to
SystemExit. fixed: [ruby-core:05724]
* eval.c (rb_thread_terminated): show backtrace before propagate
exceptions to main thread.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -10530,6 +10530,9 @@ rb_thread_switch(n) case RESTORE_EXIT: ruby_errinfo = th_raise_exception; ruby_current_node = th_raise_node; + if (!rb_obj_is_kind_of(ruby_errinfo, rb_eSystemExit)) { + terminate_process(EXIT_FAILURE, ruby_errinfo); + } rb_exc_raise(th_raise_exception); break; case RESTORE_NORMAL: @@ -12170,6 +12173,7 @@ rb_thread_terminated(th, state, status) } else if (th->safe < 4 && (ruby_thread_abort || th->abort || RTEST(ruby_debug))) { /* exit on main_thread */ + error_print(); rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT); } else { |