summaryrefslogtreecommitdiff
path: root/src/script.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-03 02:45:55 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-03 02:45:55 +0200
commitd96cd236f3e983ff35ef16f7c9979c8341d5ae0c (patch)
tree7efba1a2dbc5224a7ce36dd60197f658ef3b5883 /src/script.h
parent581f950e10b40f2af4ede56c3fa78f13eccb610b (diff)
downloadminetest-d96cd236f3e983ff35ef16f7c9979c8341d5ae0c.tar.gz
minetest-d96cd236f3e983ff35ef16f7c9979c8341d5ae0c.tar.bz2
minetest-d96cd236f3e983ff35ef16f7c9979c8341d5ae0c.zip
Enforced mod global naming convention and better error reporting
Diffstat (limited to 'src/script.h')
-rw-r--r--src/script.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/script.h b/src/script.h
index 6da95acf7..3c056ae35 100644
--- a/src/script.h
+++ b/src/script.h
@@ -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,8 +39,6 @@ public:
std::string m_s;
};
-typedef struct lua_State lua_State;
-
lua_State* script_init();
void script_deinit(lua_State *L);
void script_error(lua_State *L, const char *fmt, ...);