summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/eval.c b/eval.c
index 60a5d0c930..ede12a9a24 100644
--- a/eval.c
+++ b/eval.c
@@ -2672,13 +2672,12 @@ rb_longjmp(tag, mesg, at)
if (NIL_P(errinfo) && NIL_P(mesg)) {
errinfo = exc_new(eRuntimeError, 0, 0);
}
-#if 1
- if (debug) {
- fprintf(stderr, "Exception `%s' occurred at %s:%d\n",
+
+ if (debug && !NIL_P(errinfo)) {
+ fprintf(stderr, "Exception `%s' at %s:%d\n",
rb_class2name(CLASS_OF(errinfo)),
sourcefile, sourceline);
}
-#endif
if (!NIL_P(at)) {
errat = check_errat(at);
}
@@ -2695,13 +2694,12 @@ rb_longjmp(tag, mesg, at)
}
str_freeze(errinfo);
}
-#if 0
- if (debug) {
- error_print();
- }
-#endif
trap_restore_mask();
+ if (trace_func && tag != TAG_FATAL) {
+ call_trace_func("raise", sourcefile, sourceline,
+ the_frame->self, the_frame->last_func);
+ }
JUMP_TAG(tag);
}