You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling a lua function checkErrorAndThrow is called which reports an error. However the return value (false on error) is ignored. So calling e.g. a lua function returning a bool will return true even in the error case unless the error handler throws an exception.
Not sure, if this is the expected behaviour as e.g. an invalid lua state returns a default constructed result.
Also there is no way to check for an error. If something like this was possible would be great: if(!lua["boolFunc"].call<bool>() || !lua) return false;
But unless the error handler throws there is no way do distinguish between a normal return or a error state.
The text was updated successfully, but these errors were encountered:
When calling a lua function
checkErrorAndThrow
is called which reports an error. However the return value (false on error) is ignored. So calling e.g. a lua function returning a bool will return true even in the error case unless the error handler throws an exception.Not sure, if this is the expected behaviour as e.g. an invalid lua state returns a default constructed result.
Also there is no way to check for an error. If something like this was possible would be great:
if(!lua["boolFunc"].call<bool>() || !lua) return false;
But unless the error handler throws there is no way do distinguish between a normal return or a error state.
The text was updated successfully, but these errors were encountered: