From 7594a8df7504c99be3859c87275f623a4b37d14a Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 27 Oct 2018 23:13:34 +0000 Subject: [PATCH] fix error message and backtrace order git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- eval_error.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eval_error.c b/eval_error.c index 6ce2a8f9a2..82ada4dc40 100644 --- a/eval_error.c +++ b/eval_error.c @@ -232,12 +232,12 @@ show_cause(VALUE errinfo, VALUE str, VALUE highlight, VALUE reverse) VALUE emesg = rb_get_message(cause); if (reverse) { show_cause(cause, str, highlight, reverse); - print_errinfo(eclass, errat, emesg, str, highlight!=0); - print_backtrace(eclass, errat, str, FALSE); - } - else { print_backtrace(eclass, errat, str, TRUE); print_errinfo(eclass, errat, emesg, str, highlight!=0); + } + else { + print_errinfo(eclass, errat, emesg, str, highlight!=0); + print_backtrace(eclass, errat, str, FALSE); show_cause(cause, str, highlight, reverse); } }