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/exceptions.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/exceptions.h') diff --git a/src/exceptions.h b/src/exceptions.h index 6bf832828..4f18f70d9 100644 --- a/src/exceptions.h +++ b/src/exceptions.h @@ -125,6 +125,12 @@ public: PrngException(std::string s): BaseException(s) {} }; +class ModError : public BaseException { +public: + ModError(const std::string &s): BaseException(s) {} +}; + + /* Some "old-style" interrupts: */ -- cgit v1.2.3