Skip to content

Commit

Permalink
* eval_error.c (error_handle): SystemExit and SignalException throws
Browse files Browse the repository at this point in the history
  TAG_RAISE but not TAG_FATAL.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed May 27, 2008
1 parent bcb5742 commit 1cdd124
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Tue May 27 21:53:49 2008 Nobuyoshi Nakada <[email protected]>
Tue May 27 22:10:44 2008 Nobuyoshi Nakada <[email protected]>

* eval_error.c (error_handle): SystemExit and SignalException throws
TAG_RAISE but not TAG_FATAL.

* thread.c (rb_thread_execute_interrupts): delay interrupts during
raising exceptions. [ruby-dev:34855]
Expand Down
6 changes: 4 additions & 2 deletions eval_error.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ error_handle(int ex)
error_pos();
warn_printf(": unexpected throw\n");
break;
case TAG_RAISE:
case TAG_FATAL: {
case TAG_RAISE: {
VALUE errinfo = GET_THREAD()->errinfo;
if (rb_obj_is_kind_of(errinfo, rb_eSystemExit)) {
status = sysexit_status(errinfo);
Expand All @@ -261,6 +260,9 @@ error_handle(int ex)
}
break;
}
case TAG_FATAL:
error_print();
break;
default:
rb_bug("Unknown longjmp status %d", ex);
break;
Expand Down

0 comments on commit 1cdd124

Please sign in to comment.