#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()
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);