1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Improve Script CPP API diagnostics

This commit is contained in:
kwolekr 2015-08-05 00:49:35 -04:00
parent 3183d5a403
commit bcf47bc67c
16 changed files with 129 additions and 107 deletions

View file

@ -40,6 +40,12 @@ extern "C" {
// use that name to bypass security!
#define BUILTIN_MOD_NAME "*builtin*"
#define PCALL_RES(RES) do { \
int result_ = (RES); \
if (result_ != 0) { \
scriptError(result_, __FUNCTION__); \
} \
} while (0)
class Server;
class Environment;
@ -74,7 +80,7 @@ protected:
{ return m_luastack; }
void realityCheck();
void scriptError();
void scriptError(int result, const char *fxn);
void stackDump(std::ostream &o);
void setServer(Server* server) { m_server = server; }