RGSSError is a subclass of StandardError
This commit is contained in:
parent
d223d83cbf
commit
e9d0d0566b
|
@ -41,7 +41,6 @@ struct
|
||||||
} static customExc[] =
|
} static customExc[] =
|
||||||
{
|
{
|
||||||
{ MKXP, "MKXPError" },
|
{ MKXP, "MKXPError" },
|
||||||
{ RGSS, "RGSSError" },
|
|
||||||
{ PHYSFS, "PHYSFSError" },
|
{ PHYSFS, "PHYSFSError" },
|
||||||
{ SDL, "SDLError" }
|
{ SDL, "SDLError" }
|
||||||
};
|
};
|
||||||
|
@ -51,6 +50,7 @@ RbData::RbData()
|
||||||
for (size_t i = 0; i < ARRAY_SIZE(customExc); ++i)
|
for (size_t i = 0; i < ARRAY_SIZE(customExc); ++i)
|
||||||
exc[customExc[i].id] = rb_define_class(customExc[i].name, rb_eException);
|
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[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"));
|
exc[ErrnoENOENT] = rb_const_get(rb_const_get(rb_cObject, rb_intern("Errno")), rb_intern("ENOENT"));
|
||||||
|
|
|
@ -68,7 +68,6 @@ struct MrbExcData
|
||||||
static const MrbExcData excData[] =
|
static const MrbExcData excData[] =
|
||||||
{
|
{
|
||||||
{ Shutdown, "SystemExit" },
|
{ Shutdown, "SystemExit" },
|
||||||
{ RGSS, "RGSSError" },
|
|
||||||
{ PHYSFS, "PHYSFSError" },
|
{ PHYSFS, "PHYSFSError" },
|
||||||
{ SDL, "SDLError" },
|
{ SDL, "SDLError" },
|
||||||
{ MKXP, "MKXPError" },
|
{ MKXP, "MKXPError" },
|
||||||
|
@ -108,6 +107,8 @@ MrbData::MrbData(mrb_state *mrb)
|
||||||
for (size_t i = 0; i < excDataN; ++i)
|
for (size_t i = 0; i < excDataN; ++i)
|
||||||
exc[excData[i].ind] = mrb_define_class(mrb, excData[i].str, mrb->eException_class);
|
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");
|
RClass *errnoMod = mrb_define_module(mrb, "Errno");
|
||||||
|
|
||||||
for (size_t i = 0; i < enoExcDataN; ++i)
|
for (size_t i = 0; i < enoExcDataN; ++i)
|
||||||
|
|
Loading…
Reference in New Issue