mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +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:
@@ -36,7 +36,7 @@ int w_Source_clone(lua_State *L)
|
||||
{
|
||||
Source *t = luax_checksource(L, 1);
|
||||
Source *clone = nullptr;
|
||||
EXCEPT_GUARD(clone = t->clone();)
|
||||
luax_catchexcept(L, [&](){ clone = t->clone(); });
|
||||
luax_pushtype(L, "Source", AUDIO_SOURCE_T, clone);
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user