Remove nlerror in getCurrentWindowUnder (useless)

Add debug when lua error
fixes
Nuno 3 years ago
parent 1e590f1a69
commit c616010246

@ -1123,7 +1123,6 @@ namespace NLGUI
if(!pIE)
{
ls.pushNil();
nlerror("getCurrentWindowUnder(): No UICaller found. return Nil");
}
else
{
@ -1672,7 +1671,7 @@ namespace NLGUI
ls.registerFunc("runFct", runFct);
ls.registerFunc("runCommand", runCommand);
ls.registerFunc("getPathContent", getPathContent);
// Through LUABind API
lua_State *L= ls.getStatePointer();

@ -70,7 +70,17 @@ namespace NLGUI
}
catch( const ELuaError &e )
{
nlwarning( e.luaWhat().c_str() );
#if !FINAL_VERSION
nlwarning("--- LUA ERROR ---");
nlwarning(e.luaWhat().c_str());
std::vector<std::string> res;
NLMISC::explode(luaScript, std::string("\n"), res);
for(uint k = 0; k < res.size(); ++k)
{
nlwarning("%.05u %s", k, res[k].c_str());
}
nlwarning("--- ********* ---");
#endif
return false;
}

Loading…
Cancel
Save