From e885e59d4537f164b600d2fc579cc195cc8df76f Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 6 Apr 2013 01:19:31 +0900 Subject: comment E_* macros to address concerns in #1143 --- include/mruby.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/mruby.h') 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")) -- cgit v1.2.3