From ba0154c6718173c8717188264da7882a5a834b62 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Mon, 3 Sep 2012 01:26:12 +0900 Subject: should print file:line when exception is raised within mrblib --- src/error.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/error.c') diff --git a/src/error.c b/src/error.c index 444a088c9..da8786650 100644 --- a/src/error.c +++ b/src/error.c @@ -186,8 +186,8 @@ exc_debug_info(mrb_state *mrb, struct RObject *exc) mrb_callinfo *ci = mrb->ci; mrb_code *pc = ci->pc; + ci--; while (ci >= mrb->cibase) { - if (!pc && ci->pc) pc = ci->pc; if (ci->proc && !MRB_PROC_CFUNC_P(ci->proc)) { mrb_irep *irep = ci->proc->body.irep; @@ -197,6 +197,7 @@ exc_debug_info(mrb_state *mrb, struct RObject *exc) return; } } + pc = ci->pc; ci--; } } -- cgit v1.2.3