summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authoreregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 18:43:42 +0000
committereregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-12 18:43:42 +0000
commit5a3c024df0a83d1f64f10f028f1082e67f88c013 (patch)
tree72d698e12f3c39e6fdc66bd333a8bbebdd62172c /thread.c
parent2406207cbba15384868255d75dd3b8cb71b60e85 (diff)
Set Thread.report_on_exception=true by default to report exceptions in Threads
* [Feature #14143] [ruby-core:83979] * vm.c (vm_init2): Set Thread.report_on_exception to true. * thread.c (thread_start_func_2): Add indication the message is caused by report_on_exception = true. * spec/ruby: Specify the new behavior. * test/ruby/test_thread.rb: Adapt and improve tests for Thread.report_on_exception and Thread#report_on_exception. * test/ruby/test_thread.rb, test/ruby/test_exception.rb: Unset report_on_exception for tests expecting no extra output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 02c689df05..30dfb96fb7 100644
--- a/thread.c
+++ b/thread.c
@@ -648,7 +648,7 @@ thread_start_func_2(rb_thread_t *th, VALUE *stack_start, VALUE *register_stack_s
else {
if (th->report_on_exception) {
VALUE mesg = rb_thread_to_s(th->self);
- rb_str_cat_cstr(mesg, " terminated with exception:\n");
+ rb_str_cat_cstr(mesg, " terminated with exception (report_on_exception is true):\n");
rb_write_error_str(mesg);
rb_ec_error_print(th->ec, errinfo);
}