From 9269a0ecc7267822bc5ac5af95ad4977bdc94fec Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Thu, 29 Oct 2015 14:48:10 -0400 Subject: Fix server crashing on Lua errors Previously, the server called FATAL_ERROR when a Lua error occured. This caused a (mostly useless) core dump. The server now simply throws an exception, which is caught and printed before exiting with a non-zero return value. This also fixes a number of instances where errors were logged multiple times. --- src/script/common/c_types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/script/common') diff --git a/src/script/common/c_types.h b/src/script/common/c_types.h index 706470737..056f30251 100644 --- a/src/script/common/c_types.h +++ b/src/script/common/c_types.h @@ -52,10 +52,10 @@ public: } }; -class LuaError : public ServerError +class LuaError : public ModError { public: - LuaError(const std::string &s) : ServerError(s) {} + LuaError(const std::string &s) : ModError(s) {} }; -- cgit v1.2.3