Skip to content

Commit

Permalink
MRI: Actually throw ENOENT for missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
mook committed Oct 29, 2015
1 parent 7bf6eca commit 75f6a8c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions binding-mri/filesystem-binding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ DEF_TYPE_CUSTOMFREE(FileInt, fileIntFreeInstance);
static VALUE
fileIntForPath(const char *path, bool rubyExc)
{
if (!shState->fileSystem().exists(path))
{
Exception e(Exception::NoFileError, "%s does not exist", path);
raiseRbExc(e);
}

SDL_RWops *ops = SDL_AllocRW();

try
Expand Down

0 comments on commit 75f6a8c

Please sign in to comment.