Raise exception on too big textures
This commit is contained in:
parent
31c007b541
commit
f81e20cc68
7 changed files with 41 additions and 43 deletions
|
@ -53,6 +53,7 @@ struct
|
|||
const char *name;
|
||||
} static customExc[] =
|
||||
{
|
||||
{ MKXP, "MKXPError" },
|
||||
{ RGSS, "RGSSError" },
|
||||
{ PHYSFS, "PHYSFSError" },
|
||||
{ SDL, "SDLError" }
|
||||
|
@ -85,7 +86,8 @@ static const RbException excToRbExc[] =
|
|||
ArgumentError,
|
||||
|
||||
PHYSFS, /* PHYSFSError */
|
||||
SDL /* SDLError */
|
||||
SDL, /* SDLError */
|
||||
MKXP /* MKXPError */
|
||||
};
|
||||
|
||||
void raiseRbExc(const Exception &exc)
|
||||
|
|
|
@ -31,6 +31,7 @@ enum RbException
|
|||
RGSS = 0,
|
||||
PHYSFS,
|
||||
SDL,
|
||||
MKXP,
|
||||
|
||||
ErrnoENOENT,
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ RB_METHOD(bitmapInitialize)
|
|||
int width, height;
|
||||
rb_get_args(argc, argv, "ii", &width, &height);
|
||||
|
||||
b = new Bitmap(width, height);
|
||||
GUARD_EXC( b = new Bitmap(width, height); )
|
||||
}
|
||||
|
||||
setPrivateData(self, b, BitmapType);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue