Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 31, 2011, 5:15:13 PM (13 years ago)
Author:
landauf
Message:

Replaced COUT with orxout in core. Tried to set levels and contexts in a more or less useful way, but not really optimized.

File:
1 edited

Legend:

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

    r8801 r8806  
    9797        else
    9898        {
    99             COUT(2) << "LuaState: Cannot include file '" << filename << "' (not found)." << std::endl;
     99            orxout(internal_warning, context::lua) << "LuaState: Cannot include file '" << filename << "' (not found)." << endl;
    100100            return false;
    101101        }
     
    137137        else
    138138        {
    139             COUT(2) << "LuaState: Cannot do file '" << filename << "' (not found)." << std::endl;
     139            orxout(internal_warning, context::lua) << "LuaState: Cannot do file '" << filename << "' (not found)." << endl;
    140140            return false;
    141141        }
     
    177177        {
    178178        case LUA_ERRSYNTAX: // Syntax error
    179             COUT(1) << "Lua syntax error: " << lua_tostring(luaState_, -1) << std::endl;
     179            orxout(internal_error, context::lua) << "Lua syntax error: " << lua_tostring(luaState_, -1) << endl;
    180180            break;
    181181        case LUA_ERRMEM:    // Memory allocation error
    182             COUT(1) << "Lua memory allocation error: Consult your dentist immediately!" << std::endl;
     182            orxout(internal_error, context::lua) << "Lua memory allocation error: Consult your dentist immediately!" << endl;
    183183            break;
    184184        }
     
    201201                    std::string errorString = lua_tostring(this->luaState_, -1);
    202202                    if (errorString.find("Error propagation") == std::string::npos)
    203                         COUT(1) << "Lua runtime error: " << errorString << std::endl;
     203                        orxout(internal_error, context::lua) << "Lua runtime error: " << errorString << endl;
    204204                }
    205205                break;
    206206            case LUA_ERRERR: // Error in the error handler
    207                 COUT(1) << "Lua error in error handler. No message available." << std::endl;
     207                orxout(internal_error, context::lua) << "Lua error in error handler. No message available." << endl;
    208208                break;
    209209            case LUA_ERRMEM: // Memory allocation error
    210                 COUT(1) << "Lua memory allocation error: Consult your dentist immediately!" << std::endl;
     210                orxout(internal_error, context::lua) << "Lua memory allocation error: Consult your dentist immediately!" << endl;
    211211                break;
    212212            }
     
    290290            if (it->first == name || it->second == function)
    291291            {
    292                 COUT(2) << "Warning: Trying to add a Tolua interface with the same name or function." << std::endl;
     292                orxout(internal_warning, context::lua) << "Trying to add a Tolua interface with the same name or function." << endl;
    293293                return true;
    294294            }
     
    309309        if (it == getToluaInterfaces().end())
    310310        {
    311             COUT(2) << "Warning: Cannot remove Tolua interface '" << name << "': Not found" << std::endl;
     311            orxout(internal_warning, context::lua) << "Cannot remove Tolua interface '" << name << "': Not found" << endl;
    312312            return true;
    313313        }
Note: See TracChangeset for help on using the changeset viewer.