summaryrefslogtreecommitdiffhomepage
path: root/include/mruby.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mruby.h')
-rw-r--r--include/mruby.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mruby.h b/include/mruby.h
index e204820a3..1336d34d8 100644
--- a/include/mruby.h
+++ b/include/mruby.h
@@ -125,6 +125,7 @@ typedef struct mrb_state {
mrb_bool gc_disabled:1;
mrb_bool gc_full:1;
mrb_bool is_generational_gc_mode:1;
+ mrb_bool out_of_memory:1;
size_t majorgc_old_threshold;
struct alloca_header *mems;
@@ -281,9 +282,15 @@ void mrb_exc_raise(mrb_state *mrb, mrb_value exc);
void mrb_raise(mrb_state *mrb, struct RClass *c, const char *msg);
void mrb_raisef(mrb_state *mrb, struct RClass *c, const char *fmt, ...);
+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"))