mirror of https://github.com/axmolengine/axmol.git
remove exception catch from CCLuaEngine::executeFunctionByHandler()
This commit is contained in:
parent
c6c7fb1be6
commit
5b98cf8539
|
@ -158,22 +158,22 @@ int CCLuaEngine::executeFunctionByHandler(int nHandler, int numArgs)
|
|||
}
|
||||
|
||||
int error = 0;
|
||||
try
|
||||
{
|
||||
// try
|
||||
// {
|
||||
error = lua_pcall(m_state, numArgs, 1, 0); /* stack: ... ret */
|
||||
}
|
||||
catch (exception& e)
|
||||
{
|
||||
CCLOG("[LUA ERROR] lua_pcall(%d) catch C++ exception: %s", nHandler, e.what());
|
||||
lua_settop(m_state, 0);
|
||||
return 0;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
CCLOG("[LUA ERROR] lua_pcall(%d) catch C++ unknown exception.", nHandler);
|
||||
lua_settop(m_state, 0);
|
||||
return 0;
|
||||
}
|
||||
// }
|
||||
// catch (exception& e)
|
||||
// {
|
||||
// CCLOG("[LUA ERROR] lua_pcall(%d) catch C++ exception: %s", nHandler, e.what());
|
||||
// lua_settop(m_state, 0);
|
||||
// return 0;
|
||||
// }
|
||||
// catch (...)
|
||||
// {
|
||||
// CCLOG("[LUA ERROR] lua_pcall(%d) catch C++ unknown exception.", nHandler);
|
||||
// lua_settop(m_state, 0);
|
||||
// return 0;
|
||||
// }
|
||||
if (error)
|
||||
{
|
||||
CCLOG("[LUA ERROR] %s", lua_tostring(m_state, - 1));
|
||||
|
|
Loading…
Reference in New Issue