mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-12 09:24:07 +00:00
Allow access to raw error messages from outside lj_err.c.
This commit is contained in:
parent
0ffd06aba8
commit
d98cd19bb0
@ -72,13 +72,11 @@
|
|||||||
/* -- Error messages ------------------------------------------------------ */
|
/* -- Error messages ------------------------------------------------------ */
|
||||||
|
|
||||||
/* Error message strings. */
|
/* Error message strings. */
|
||||||
static const char *lj_err_allmsg =
|
LJ_DATADEF const char *lj_err_allmsg =
|
||||||
#define ERRDEF(name, msg) msg "\0"
|
#define ERRDEF(name, msg) msg "\0"
|
||||||
#include "lj_errmsg.h"
|
#include "lj_errmsg.h"
|
||||||
;
|
;
|
||||||
|
|
||||||
#define err2msg(em) (lj_err_allmsg+(int)(em))
|
|
||||||
|
|
||||||
/* -- Frame and function introspection ------------------------------------ */
|
/* -- Frame and function introspection ------------------------------------ */
|
||||||
|
|
||||||
static BCPos currentpc(lua_State *L, GCfunc *fn, cTValue *nextframe)
|
static BCPos currentpc(lua_State *L, GCfunc *fn, cTValue *nextframe)
|
||||||
|
@ -17,6 +17,9 @@ typedef enum {
|
|||||||
LJ_ERR__MAX
|
LJ_ERR__MAX
|
||||||
} ErrMsg;
|
} ErrMsg;
|
||||||
|
|
||||||
|
LJ_DATA const char *lj_err_allmsg;
|
||||||
|
#define err2msg(em) (lj_err_allmsg+(int)(em))
|
||||||
|
|
||||||
LJ_FUNC GCstr *lj_err_str(lua_State *L, ErrMsg em);
|
LJ_FUNC GCstr *lj_err_str(lua_State *L, ErrMsg em);
|
||||||
LJ_FUNCA_NORET void LJ_FASTCALL lj_err_throw(lua_State *L, int errcode);
|
LJ_FUNCA_NORET void LJ_FASTCALL lj_err_throw(lua_State *L, int errcode);
|
||||||
LJ_FUNC_NORET void lj_err_mem(lua_State *L);
|
LJ_FUNC_NORET void lj_err_mem(lua_State *L);
|
||||||
|
Loading…
Reference in New Issue
Block a user