aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-19 08:23:48 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-19 08:23:48 +0200
commit5ef78cd81504261a1195fe72a93db18a71ad12a7 (patch)
tree62a34f57d2fdc59a3ec8b9ce472d79dfa2d13240
parent9101b680c055d4b13f39d55f2b4169883644cc36 (diff)
downloadminetest-5ef78cd81504261a1195fe72a93db18a71ad12a7.tar.gz
minetest-5ef78cd81504261a1195fe72a93db18a71ad12a7.tar.bz2
minetest-5ef78cd81504261a1195fe72a93db18a71ad12a7.zip
Make Lua error output in log clearer
-rw-r--r--src/script.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/script.cpp b/src/script.cpp
index 1925ea701..a159f2288 100644
--- a/src/script.cpp
+++ b/src/script.cpp
@@ -96,10 +96,13 @@ bool script_load(lua_State *L, const char *path)
int ret = luaL_loadfile(L, path) || lua_pcall(L, 0, 0, errorhandler);
if(ret){
- errorstream<<"Failed to load and run script from "<<path<<":"<<std::endl;
- errorstream<<"[LUA] "<<std::endl;
- errorstream<<"[LUA] "<<lua_tostring(L, -1)<<std::endl;
- errorstream<<"[LUA] "<<std::endl;
+ errorstream<<"========== ERROR FROM LUA ==========="<<std::endl;
+ errorstream<<"Failed to load and run script from "<<std::endl;
+ errorstream<<path<<":"<<std::endl;
+ errorstream<<std::endl;
+ errorstream<<lua_tostring(L, -1)<<std::endl;
+ errorstream<<std::endl;
+ errorstream<<"=======END OF ERROR FROM LUA ========"<<std::endl;
lua_pop(L, 1); // Pop error message from stack
lua_pop(L, 1); // Pop the error handler from stack
return false;