Fix and improve Server's privilege get/setters
[oweals/minetest.git] / src / script.h
index 6da95acf73fef7fe77773d19f61f7a1c9356a7f9..3bf5342f5e29c7558fcb7e2123a71400fa4866d8 100644 (file)
@@ -23,14 +23,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <exception>
 #include <string>
 
+typedef struct lua_State lua_State;
+
 class LuaError : public std::exception
 {
 public:
-       LuaError(const std::string &s)
-       {
-               m_s = "LuaError: ";
-               m_s += s;
-       }
+       LuaError(lua_State *L, const std::string &s);
+
        virtual ~LuaError() throw()
        {}
        virtual const char * what() const throw()
@@ -40,10 +39,9 @@ public:
        std::string m_s;
 };
 
-typedef struct lua_State lua_State;
-
 lua_State* script_init();
 void script_deinit(lua_State *L);
+std::string script_get_backtrace(lua_State *L);
 void script_error(lua_State *L, const char *fmt, ...);
 bool script_load(lua_State *L, const char *path);