diff options
author | Eugene Sandulenko | 2019-07-20 11:45:52 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:25 +0200 |
commit | 29884079360ef57f97d43ed1e1b9dd460f5b52ac (patch) | |
tree | 12ff4bbb846d1dffacb4fe52a01e64188ea2106a /engines | |
parent | b2f52580f4f268715d41ebc71f0678f782a3aa34 (diff) | |
download | scummvm-rg350-29884079360ef57f97d43ed1e1b9dd460f5b52ac.tar.gz scummvm-rg350-29884079360ef57f97d43ed1e1b9dd460f5b52ac.tar.bz2 scummvm-rg350-29884079360ef57f97d43ed1e1b9dd460f5b52ac.zip |
HDB: Improved error messages during Lua execution
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/lua-script.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/hdb/lua-script.cpp b/engines/hdb/lua-script.cpp index 775daf4ec3..39ad12fc56 100644 --- a/engines/hdb/lua-script.cpp +++ b/engines/hdb/lua-script.cpp @@ -1824,7 +1824,7 @@ bool LuaScript::initScript(Common::SeekableReadStream *stream, const char *scrip lua_insert(_state, -2); if (lua_pcall(_state, 0, 0, -2)) { - error("An error occured while executing \"%s\": %s.", "level_init", lua_tostring(_state, -1)); + error("LuaScript::initScript: An error occured while executing \"%s\": %s.", "level_init", lua_tostring(_state, -1)); lua_pop(_state, -1); return false; @@ -1866,7 +1866,7 @@ void LuaScript::call(int args, int returns) { return; if (lua_pcall(_state, args, returns, -2)) { - error("An error occured while executing: %s.", lua_tostring(_state, -1)); + error("LuaScript::call: An error occured while executing: %s.", lua_tostring(_state, -1)); lua_pop(_state, -1); } } @@ -1879,7 +1879,7 @@ bool LuaScript::callFunction(const char *name, int returns) { lua_getglobal(_state, name); if (lua_pcall(_state, 0, returns, -2)) { - error("callFunction: An error occured while executing \"%s\": %s.", name, lua_tostring(_state, -1)); + error("LuaScript::callFunction: An error occured while executing \"%s\": %s.", name, lua_tostring(_state, -1)); lua_pop(_state, -1); return false; @@ -1997,7 +1997,7 @@ bool LuaScript::executeChunk(Common::String &chunk, const Common::String &chunkN // Execute Chunk if (lua_pcall(_state, 0, 0, -2)) { - error("executeChunk: An error occured while executing \"%s\": %s.", chunkName.c_str(), lua_tostring(_state, -1)); + error("LuaScript::executeChunk: An error occured while executing \"%s\": %s.", chunkName.c_str(), lua_tostring(_state, -1)); lua_pop(_state, -1); return false; |