[Orxonox-commit 2002] r6719 - code/branches/gamestates2/src/libraries/core
rgrieder at orxonox.net
rgrieder at orxonox.net
Tue Apr 13 15:56:17 CEST 2010
Author: rgrieder
Date: 2010-04-13 15:56:17 +0200 (Tue, 13 Apr 2010)
New Revision: 6719
Modified:
code/branches/gamestates2/src/libraries/core/LuaState.cc
Log:
Fixed error reporting problem in LuaState.cc when parsing LuaStateInit.lua.
Modified: code/branches/gamestates2/src/libraries/core/LuaState.cc
===================================================================
--- code/branches/gamestates2/src/libraries/core/LuaState.cc 2010-04-13 13:55:30 UTC (rev 6718)
+++ code/branches/gamestates2/src/libraries/core/LuaState.cc 2010-04-13 13:56:17 UTC (rev 6719)
@@ -211,8 +211,17 @@
switch (error)
{
case LUA_ERRRUN: // Runtime error
- // Do nothing (we already display the error in the
- // 'errorHandler' Lua function in LuaStateInit.lua)
+ if (errorHandler)
+ {
+ // Do nothing (we already display the error in the
+ // 'errorHandler' Lua function in LuaStateInit.lua)
+ }
+ else
+ {
+ std::string errorString = lua_tostring(this->luaState_, -1);
+ if (errorString.find("Error propagation") == std::string::npos)
+ COUT(1) << "Lua runtime error: " << errorString << std::endl;
+ }
break;
case LUA_ERRERR: // Error in the error handler
COUT(1) << "Lua error in error handler. No message available." << std::endl;
More information about the Orxonox-commit
mailing list