1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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/trunk@9092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2005-09-07 01:45:40 +00:00
parent 8955a2d930
commit 17a4e4b1ad
2 changed files with 12 additions and 0 deletions

View file

@ -1,3 +1,11 @@
Wed Sep 7 10:45:15 2005 Nobuyoshi Nakada <nobu@ruby-lang.org>
* 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.
Wed Sep 7 09:21:41 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> Wed Sep 7 09:21:41 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp>
* win32/win32.[hc] (rb_w32_utime): constified. * win32/win32.[hc] (rb_w32_utime): constified.

4
eval.c
View file

@ -10530,6 +10530,9 @@ rb_thread_switch(n)
case RESTORE_EXIT: case RESTORE_EXIT:
ruby_errinfo = th_raise_exception; ruby_errinfo = th_raise_exception;
ruby_current_node = th_raise_node; 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); rb_exc_raise(th_raise_exception);
break; break;
case RESTORE_NORMAL: 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))) { else if (th->safe < 4 && (ruby_thread_abort || th->abort || RTEST(ruby_debug))) {
/* exit on main_thread */ /* exit on main_thread */
error_print();
rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT); rb_thread_main_jump(ruby_errinfo, RESTORE_EXIT);
} }
else { else {