mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Enforced mod global naming convention and better error reporting
This commit is contained in:
parent
581f950e10
commit
d96cd236f3
7 changed files with 258 additions and 140 deletions
11
src/script.h
11
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, ...);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue