Changeset 8858 for code/trunk/src/libraries/core/LuaState.cc
- Timestamp:
- Aug 23, 2011, 12:45:53 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 1 build 2 2 codeblocks 3 vs 3 4 dependencies
-
- Property svn:mergeinfo changed
/code/branches/output (added) merged: 8739-8740,8765,8771-8772,8774-8780,8787-8789,8794-8799,8801,8803-8812,8814,8816-8817,8820,8822,8825-8837,8840,8844,8846,8848-8850,8853-8854
- Property svn:ignore
-
code/trunk/src/libraries/core/LuaState.cc
r8729 r8858 37 37 #include <loki/ScopeGuard.h> 38 38 39 #include "util/ Debug.h"39 #include "util/Output.h" 40 40 #include "util/Exception.h" 41 41 #include "Resource.h" … … 96 96 else 97 97 { 98 COUT(2) << "LuaState: Cannot include file '" << filename << "' (not found)." << std::endl;98 orxout(internal_warning, context::lua) << "LuaState: Cannot include file '" << filename << "' (not found)." << endl; 99 99 return false; 100 100 } … … 136 136 else 137 137 { 138 COUT(2) << "LuaState: Cannot do file '" << filename << "' (not found)." << std::endl;138 orxout(internal_warning, context::lua) << "LuaState: Cannot do file '" << filename << "' (not found)." << endl; 139 139 return false; 140 140 } … … 176 176 { 177 177 case LUA_ERRSYNTAX: // Syntax error 178 COUT(1) << "Lua syntax error: " << lua_tostring(luaState_, -1) << std::endl;178 orxout(internal_error, context::lua) << "Lua syntax error: " << lua_tostring(luaState_, -1) << endl; 179 179 break; 180 180 case LUA_ERRMEM: // Memory allocation error 181 COUT(1) << "Lua memory allocation error: Consult your dentist immediately!" << std::endl;181 orxout(internal_error, context::lua) << "Lua memory allocation error: Consult your dentist immediately!" << endl; 182 182 break; 183 183 } … … 200 200 std::string errorString = lua_tostring(this->luaState_, -1); 201 201 if (errorString.find("Error propagation") == std::string::npos) 202 COUT(1) << "Lua runtime error: " << errorString << std::endl;202 orxout(internal_error, context::lua) << "Lua runtime error: " << errorString << endl; 203 203 } 204 204 break; 205 205 case LUA_ERRERR: // Error in the error handler 206 COUT(1) << "Lua error in error handler. No message available." << std::endl;206 orxout(internal_error, context::lua) << "Lua error in error handler. No message available." << endl; 207 207 break; 208 208 case LUA_ERRMEM: // Memory allocation error 209 COUT(1) << "Lua memory allocation error: Consult your dentist immediately!" << std::endl;209 orxout(internal_error, context::lua) << "Lua memory allocation error: Consult your dentist immediately!" << endl; 210 210 break; 211 211 } … … 236 236 } 237 237 238 void LuaState::luaLog(unsigned int level, const std::string& message) 239 { 240 OutputHandler::getOutStream(level) << message << std::endl; 238 void LuaState::luaOutput(OutputLevel level, const std::string& context, const std::string& message) 239 { 240 orxout(level, registerContext(context)) << message << endl; 241 } 242 243 void LuaState::luaOutput(OutputLevel level, const std::string& message) 244 { 245 orxout(level, context::lua) << message << endl; 246 } 247 248 void LuaState::luaOutput(const std::string& message) 249 { 250 orxout(debug_output, context::lua) << message << endl; 241 251 } 242 252 … … 288 298 if (it->first == name || it->second == function) 289 299 { 290 COUT(2) << "Warning: Trying to add a Tolua interface with the same name or function." << std::endl;300 orxout(internal_warning, context::lua) << "Trying to add a Tolua interface with the same name or function." << endl; 291 301 return true; 292 302 } … … 307 317 if (it == getToluaInterfaces().end()) 308 318 { 309 COUT(2) << "Warning: Cannot remove Tolua interface '" << name << "': Not found" << std::endl;319 orxout(internal_warning, context::lua) << "Cannot remove Tolua interface '" << name << "': Not found" << endl; 310 320 return true; 311 321 }
Note: See TracChangeset
for help on using the changeset viewer.