1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02:00

Remove lua_State parameter from LuaError::LuaError

This commit is contained in:
ShadowNinja
2014-03-15 16:28:59 -04:00
parent f8b7555558
commit 31fe72dbac
13 changed files with 39 additions and 52 deletions

View File

@@ -151,13 +151,14 @@ void ScriptApiBase::realityCheck()
if(top >= 30){
dstream<<"Stack is over 30:"<<std::endl;
stackDump(dstream);
throw LuaError(m_luastack, "Stack is over 30 (reality check)");
std::string traceback = script_get_backtrace(m_luastack);
throw LuaError("Stack is over 30 (reality check)\n" + traceback);
}
}
void ScriptApiBase::scriptError()
{
throw LuaError(NULL, lua_tostring(m_luastack, -1));
throw LuaError(lua_tostring(m_luastack, -1));
}
void ScriptApiBase::stackDump(std::ostream &o)