From 04a844a9c000a58bdc41b51394061757d94725f6 Mon Sep 17 00:00:00 2001 From: Koncord Date: Wed, 25 Oct 2017 15:21:11 +0800 Subject: [PATCH] [Server] Use sol's default_handler --- apps/openmw-mp/Script/LuaState.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/apps/openmw-mp/Script/LuaState.cpp b/apps/openmw-mp/Script/LuaState.cpp index b9e930518..ab67c1125 100644 --- a/apps/openmw-mp/Script/LuaState.cpp +++ b/apps/openmw-mp/Script/LuaState.cpp @@ -80,16 +80,6 @@ LuaState::LuaState() configEnv = sol::environment(*lua, sol::create, lua->globals()); lua->set("Config", configEnv); // plain global environment for mod configuration - // errors in sol::functions are caught only in Debug or RelWithDebInfo builds for better performance -#ifdef SOL_SAFE_FUNCTIONS - lua->set_function("ErrorHandler", [](sol::object error_msg) { - LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, ("Lua: " + error_msg.as()).c_str()); - }); - - sol::reference errHandler = (*lua)["ErrorHandler"]; - sol::protected_function::set_default_handler(errHandler); -#endif - sol::table Constants = lua->create_named_table("Constants"); Constants.set_function("getAttributeCount", []() {