remove exception catch from CCLuaEngine::executeFunctionByHandler()

This commit is contained in:
Liao YuLei 2012-03-08 10:57:03 +08:00
parent c6c7fb1be6
commit 5b98cf8539
1 changed files with 34 additions and 34 deletions

View File

@ -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));