projects
/
oweals
/
minetest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use GenericCAO in place of LuaEntityCAO and PlayerCAO
[oweals/minetest.git]
/
src
/
script.h
diff --git
a/src/script.h
b/src/script.h
index ce697bc50ba931b07d96e760e9bcd4df74980331..3bf5342f5e29c7558fcb7e2123a71400fa4866d8 100644
(file)
--- a/
src/script.h
+++ b/
src/script.h
@@
-20,11
+20,28
@@
with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef SCRIPT_HEADER
#define SCRIPT_HEADER
#ifndef SCRIPT_HEADER
#define SCRIPT_HEADER
+#include <exception>
+#include <string>
+
typedef struct lua_State lua_State;
typedef struct lua_State lua_State;
-//#include <string>
+
+class LuaError : public std::exception
+{
+public:
+ LuaError(lua_State *L, const std::string &s);
+
+ virtual ~LuaError() throw()
+ {}
+ virtual const char * what() const throw()
+ {
+ return m_s.c_str();
+ }
+ std::string m_s;
+};
lua_State* script_init();
void script_deinit(lua_State *L);
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);
void script_error(lua_State *L, const char *fmt, ...);
bool script_load(lua_State *L, const char *path);