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
luaState.setErrorHandler(kaguya::ErrorHandler::throwDefaultError);
kaguya::LuaFunction way_function = luaState["way_function"];
kaguya::LuaRef ret = way_function(&sharedData.osmObject);
I have a deliberate error in the lua code which I would expect to say variable not defined:
function way_function(way)
local highway = way:Find("highway")
local waterway = way:Find("waterway")
if highway~="" then
way:Layer("transportation", false)
way:Attribute("class", highway)
end
if waterway~="" then
way:Layer("waterway", false)
way:Attribute("class", waterway)
end
if building~="" then
way:Layer("building", true)
end
end
Any ideas?
The text was updated successfully, but these errors were encountered:
"In Lua programs, typos in variable names can be hard to spot because, in general, Lua will not complain that a variable is undefined." Interesting language! That's news to me. http://lua-users.org/wiki/DetectingUndefinedVariables
I would like to detect runtime errors when I call a lua function. I tried this, (similar to https://github.com/satoren/kaguya/blob/master/test/test_06_state.cpp ) but no exception is thrown.
I have a deliberate error in the lua code which I would expect to say variable not defined:
Any ideas?
The text was updated successfully, but these errors were encountered: