aboutsummaryrefslogtreecommitdiff
path: root/src/mods.h
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2015-10-29 14:48:10 -0400
committerShadowNinja <shadowninja@minetest.net>2015-10-31 13:28:58 -0400
commit9269a0ecc7267822bc5ac5af95ad4977bdc94fec (patch)
tree1cf8639cc0a6b367670ac673780f321f85b467be /src/mods.h
parentb872df6ef6a15ae4624b35ea7b8960bc24da1128 (diff)
downloadminetest-9269a0ecc7267822bc5ac5af95ad4977bdc94fec.tar.gz
minetest-9269a0ecc7267822bc5ac5af95ad4977bdc94fec.tar.bz2
minetest-9269a0ecc7267822bc5ac5af95ad4977bdc94fec.zip
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.
Diffstat (limited to 'src/mods.h')
-rw-r--r--src/mods.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/mods.h b/src/mods.h
index f35bd18db..12576516d 100644
--- a/src/mods.h
+++ b/src/mods.h
@@ -26,29 +26,11 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <vector>
#include <string>
#include <map>
-#include <exception>
#include "json/json.h"
#include "config.h"
#define MODNAME_ALLOWED_CHARS "abcdefghijklmnopqrstuvwxyz0123456789_"
-class ModError : public std::exception
-{
-public:
- ModError(const std::string &s)
- {
- m_s = "ModError: ";
- m_s += s;
- }
- virtual ~ModError() throw()
- {}
- virtual const char * what() const throw()
- {
- return m_s.c_str();
- }
- std::string m_s;
-};
-
struct ModSpec
{
std::string name;