diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-09-03 01:26:12 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-09-03 01:26:12 +0900 |
| commit | ba0154c6718173c8717188264da7882a5a834b62 (patch) | |
| tree | 98578e3d41fbf1a58d9dc0862b99282698623434 /src | |
| parent | 26ac77af9bf8b7c73f7c4d02ce453dca2fcfef9b (diff) | |
| download | mruby-ba0154c6718173c8717188264da7882a5a834b62.tar.gz mruby-ba0154c6718173c8717188264da7882a5a834b62.zip | |
should print file:line when exception is raised within mrblib
Diffstat (limited to 'src')
| -rw-r--r-- | src/error.c | 3 |
1 files changed, 2 insertions, 1 deletions
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--; } } |
