From e9d0d0566b0201c9d6c5f961f3acf87151d2fb55 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Fri, 26 Sep 2014 18:20:27 +0200 Subject: [PATCH] RGSSError is a subclass of StandardError --- binding-mri/binding-util.cpp | 2 +- binding-mruby/binding-util.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/binding-mri/binding-util.cpp b/binding-mri/binding-util.cpp index 33438b1..a663a18 100644 --- a/binding-mri/binding-util.cpp +++ b/binding-mri/binding-util.cpp @@ -41,7 +41,6 @@ struct } static customExc[] = { { MKXP, "MKXPError" }, - { RGSS, "RGSSError" }, { PHYSFS, "PHYSFSError" }, { SDL, "SDLError" } }; @@ -51,6 +50,7 @@ RbData::RbData() for (size_t i = 0; i < ARRAY_SIZE(customExc); ++i) exc[customExc[i].id] = rb_define_class(customExc[i].name, rb_eException); + exc[RGSS] = rb_define_class("RGSSError", rb_eStandardError); exc[Reset] = rb_define_class(rgssVer >= 3 ? "RGSSReset" : "Reset", rb_eException); exc[ErrnoENOENT] = rb_const_get(rb_const_get(rb_cObject, rb_intern("Errno")), rb_intern("ENOENT")); diff --git a/binding-mruby/binding-util.cpp b/binding-mruby/binding-util.cpp index 0cee594..8973b75 100644 --- a/binding-mruby/binding-util.cpp +++ b/binding-mruby/binding-util.cpp @@ -68,7 +68,6 @@ struct MrbExcData static const MrbExcData excData[] = { { Shutdown, "SystemExit" }, - { RGSS, "RGSSError" }, { PHYSFS, "PHYSFSError" }, { SDL, "SDLError" }, { MKXP, "MKXPError" }, @@ -108,6 +107,8 @@ MrbData::MrbData(mrb_state *mrb) for (size_t i = 0; i < excDataN; ++i) exc[excData[i].ind] = mrb_define_class(mrb, excData[i].str, mrb->eException_class); + exc[RGSS] = mrb_define_class(mrb, "RGSSError", mrb->eStandardError_class); + RClass *errnoMod = mrb_define_module(mrb, "Errno"); for (size_t i = 0; i < enoExcDataN; ++i)