summaryrefslogtreecommitdiff
path: root/eval_error.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-27 23:13:34 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-27 23:13:34 +0000
commit7594a8df7504c99be3859c87275f623a4b37d14a (patch)
tree434afa28219fe1ef865632d6c6df77428af997a8 /eval_error.c
parent35ca97e9816753123e273948568fab98348b3a5b (diff)
fix error message and backtrace order
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c4
1 files changed, 2 insertions, 2 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_backtrace(eclass, errat, str, TRUE);
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);
+ print_backtrace(eclass, errat, str, FALSE);
show_cause(cause, str, highlight, reverse);
}
}