diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-07-15 14:45:32 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2015-07-15 14:47:15 +0900 |
| commit | 207577f0af72874d9d643f2c46b881a9159d42d7 (patch) | |
| tree | 83de6a20178bc3fb35dfc203731d58aa5559d5a3 /mrbgems/mruby-error/src | |
| parent | 1085167fefe010be8e2d39e2adb31134a5512b15 (diff) | |
| download | mruby-207577f0af72874d9d643f2c46b881a9159d42d7.tar.gz mruby-207577f0af72874d9d643f2c46b881a9159d42d7.zip | |
mrb_protect() to return the exception raised (with the state of true)
Diffstat (limited to 'mrbgems/mruby-error/src')
| -rw-r--r-- | mrbgems/mruby-error/src/exception.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-error/src/exception.c b/mrbgems/mruby-error/src/exception.c index 9d77c6adf..911fde0be 100644 --- a/mrbgems/mruby-error/src/exception.c +++ b/mrbgems/mruby-error/src/exception.c @@ -17,6 +17,7 @@ mrb_protect(mrb_state *mrb, mrb_func_t body, mrb_value data, mrb_bool *state) mrb->jmp = prev_jmp; } MRB_CATCH(&c_jmp) { mrb->jmp = prev_jmp; + result = mrb_obj_value(mrb->exc); mrb->exc = NULL; if (state) { *state = TRUE; } } MRB_END_EXC(&c_jmp); |
