diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-06 01:19:31 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-04-06 01:19:31 +0900 |
| commit | e885e59d4537f164b600d2fc579cc195cc8df76f (patch) | |
| tree | 736b120144db9ff7c61b588f41791066d600da9b | |
| parent | 2ae47ddd09c349491beb37f49765067c3ed25237 (diff) | |
| download | mruby-e885e59d4537f164b600d2fc579cc195cc8df76f.tar.gz mruby-e885e59d4537f164b600d2fc579cc195cc8df76f.zip | |
comment E_* macros to address concerns in #1143
| -rw-r--r-- | include/mruby.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h index 9bfb31e39..1336d34d8 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -286,6 +286,11 @@ void mrb_name_error(mrb_state *mrb, mrb_sym id, const char *fmt, ...); void mrb_warn(const char *fmt, ...); void mrb_bug(const char *fmt, ...); +/* macros to get typical exception objects + note: + + those E_* macros requires mrb_state* variable named mrb. + + exception objects obtained from those macros are local to mrb +*/ #define E_RUNTIME_ERROR (mrb_class_obj_get(mrb, "RuntimeError")) #define E_TYPE_ERROR (mrb_class_obj_get(mrb, "TypeError")) #define E_ARGUMENT_ERROR (mrb_class_obj_get(mrb, "ArgumentError")) |
