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 | 9e23e9a078de4539d1601093820dfdf4b28fe4d2 (patch) | |
tree | 0314d537580df8a3ff08d737d504ac3989aa0aa8 /eval.c | |
parent | e9e21c9c806dfd094dd7525ac03a621905ded8d9 (diff) |
* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -10067,6 +10067,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: @@ -11623,6 +11626,7 @@ rb_thread_start_0(fn, arg, th) } 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 { |