summaryrefslogtreecommitdiffhomepage
path: root/include/mruby.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mruby.h')
-rw-r--r--include/mruby.h5
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"))