mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +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:
@@ -40,7 +40,7 @@ int w_GearJoint_setRatio(lua_State *L)
|
||||
{
|
||||
GearJoint *t = luax_checkgearjoint(L, 1);
|
||||
float arg1 = (float)luaL_checknumber(L, 2);
|
||||
EXCEPT_GUARD(t->setRatio(arg1);)
|
||||
luax_catchexcept(L, [&](){ t->setRatio(arg1); });
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user