mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
Replaced the EXCEPT_GUARD macro for converting love exceptions into Lua errors with the new luax_catchexcept function, which takes lambda function arguments.
This commit is contained in:
@@ -236,7 +236,7 @@ int w_File_lines(lua_State *L)
|
||||
file->close();
|
||||
|
||||
bool success = false;
|
||||
EXCEPT_GUARD(success = file->open(File::READ);)
|
||||
luax_catchexcept(L, [&](){ success = file->open(File::READ); });
|
||||
|
||||
if (!success)
|
||||
return luaL_error(L, "Could not open file.");
|
||||
|
||||
Reference in New Issue
Block a user