Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6719


Ignore:
Timestamp:
Apr 13, 2010, 3:56:17 PM (15 years ago)
Author:
rgrieder
Message:

Fixed error reporting problem in LuaState.cc when parsing LuaStateInit.lua.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamestates2/src/libraries/core/LuaState.cc

    r6670 r6719  
    212212            {
    213213            case LUA_ERRRUN: // Runtime error
    214                 // Do nothing (we already display the error in the
    215                 // 'errorHandler' Lua function in LuaStateInit.lua)
     214                if (errorHandler)
     215                {
     216                    // Do nothing (we already display the error in the
     217                    // 'errorHandler' Lua function in LuaStateInit.lua)
     218                }
     219                else
     220                {
     221                    std::string errorString = lua_tostring(this->luaState_, -1);
     222                    if (errorString.find("Error propagation") == std::string::npos)
     223                        COUT(1) << "Lua runtime error: " << errorString << std::endl;
     224                }
    216225                break;
    217226            case LUA_ERRERR: // Error in the error handler
Note: See TracChangeset for help on using the changeset viewer.