diff options
| author | take_cheeze <[email protected]> | 2014-07-21 23:09:13 +0900 |
|---|---|---|
| committer | take_cheeze <[email protected]> | 2014-07-21 23:09:13 +0900 |
| commit | 3c9660257464bb78a5b094e3f7fb1621bb9577ba (patch) | |
| tree | 8ff322acab800bee8a5ee312a6c63112db34cbdf /src/error.c | |
| parent | 4cc9e5d8b17acbebadad1508300f092db775f361 (diff) | |
| download | mruby-3c9660257464bb78a5b094e3f7fb1621bb9577ba.tar.gz mruby-3c9660257464bb78a5b094e3f7fb1621bb9577ba.zip | |
Use MRB_TT_EXCEPTION in exception object.
Diffstat (limited to 'src/error.c')
| -rw-r--r-- | src/error.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/error.c b/src/error.c index d472f7f95..223e2137e 100644 --- a/src/error.c +++ b/src/error.c @@ -15,6 +15,7 @@ #include "mruby/variable.h" #include "mruby/debug.h" #include "mruby/error.h" +#include "mruby/class.h" #include "mrb_throw.h" mrb_value @@ -442,6 +443,7 @@ mrb_init_exception(mrb_state *mrb) struct RClass *exception, *runtime_error, *script_error; mrb->eException_class = exception = mrb_define_class(mrb, "Exception", mrb->object_class); /* 15.2.22 */ + MRB_SET_INSTANCE_TT(exception, MRB_TT_EXCEPTION); mrb_define_class_method(mrb, exception, "exception", mrb_instance_new, MRB_ARGS_ANY()); mrb_define_method(mrb, exception, "exception", exc_exception, MRB_ARGS_ANY()); mrb_define_method(mrb, exception, "initialize", exc_initialize, MRB_ARGS_ANY()); |
