Commits

Bart van Strien committed c51f305

Catch exception in lines

  • Participants
  • Parent commits a291d0d

Comments (0)

Files changed (2)

   * Fixed love.filesystem.lines() leaking.
   * Fixed Source controls inconsistencies.
   * Fixed most leaking on unclosed File objects.
-  * Fixed crash when File:getSize() was called on a non-existent file.
+  * Fixed crashes when operating on non-existent files.
 
   * Renamed SpriteBatch's lock/unlock to bind/unbind.
 

File src/modules/filesystem/physfs/wrap_Filesystem.cpp

 
 	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)