Catch exception in lines

This commit is contained in:
Bart van Strien
2011-08-06 16:54:04 +02:00
parent eae6c0ff85
commit a79231f9f9
2 changed files with 9 additions and 2 deletions
@@ -221,7 +221,14 @@ namespace physfs
int w_lines(lua_State * L)
{
return instance->lines(L);
try
{
return instance->lines(L);
}
catch (Exception &e)
{
return luaL_error(L, e.what());
}
}
int w_load(lua_State * L)