Print proper error message if Lua expression parse fails
This commit is contained in:
parent
5ccdb1be8c
commit
75a0f641f4
1 changed files with 2 additions and 1 deletions
|
@ -113,7 +113,8 @@ namespace
|
||||||
|
|
||||||
#define TEMPORARY "LUAINTERP_INTERNAL_COMMAND_TEMPORARY"
|
#define TEMPORARY "LUAINTERP_INTERNAL_COMMAND_TEMPORARY"
|
||||||
|
|
||||||
const char* eval_lua_lua = "loadstring(" TEMPORARY ")();";
|
const char* eval_lua_lua = "local fn = loadstring(" TEMPORARY "); if fn then fn(); else print("
|
||||||
|
"\"Parse error in Lua statement\"); end;";
|
||||||
const char* run_lua_lua = "dofile(" TEMPORARY ");";
|
const char* run_lua_lua = "dofile(" TEMPORARY ");";
|
||||||
|
|
||||||
void run_lua_fragment(lua_state& L) throw(std::bad_alloc)
|
void run_lua_fragment(lua_state& L) throw(std::bad_alloc)
|
||||||
|
|
Loading…
Add table
Reference in a new issue