diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-11-02 07:38:00 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-11-02 07:38:00 -0700 |
| commit | b06d8e2ab8773324f067c76c6cacfde672bd66b7 (patch) | |
| tree | 0cb124737bb5b8cea98c44ddb795432295639da8 /src | |
| parent | c73dffb684d7a32bc83997d2a7d5dd61f215e588 (diff) | |
| parent | 43f4934e6d6ef14e38baf1f007f2ccc09d2781dc (diff) | |
| download | mruby-b06d8e2ab8773324f067c76c6cacfde672bd66b7.tar.gz mruby-b06d8e2ab8773324f067c76c6cacfde672bd66b7.zip | |
Merge pull request #524 from iij/pr-backtrace
show backtrace when mruby dies on unhandled exception
Diffstat (limited to 'src')
| -rw-r--r-- | src/error.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/error.c b/src/error.c index 858c70820..430728db0 100644 --- a/src/error.c +++ b/src/error.c @@ -189,6 +189,7 @@ exc_debug_info(mrb_state *mrb, struct RObject *exc) mrb_callinfo *ci = mrb->ci; mrb_code *pc = ci->pc; + mrb_obj_iv_set(mrb, exc, mrb_intern(mrb, "ciidx"), mrb_fixnum_value(ci - mrb->cibase)); ci--; while (ci >= mrb->cibase) { if (ci->proc && !MRB_PROC_CFUNC_P(ci->proc)) { |
