From 9a2dd1eff9ed1e7fdd24ad52da0f03b72c86415b Mon Sep 17 00:00:00 2001 From: antirez Date: Fri, 13 Apr 2012 15:12:16 +0200 Subject: [PATCH] EVAL errors are more clear now. --- src/scripting.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripting.c b/src/scripting.c index c449714f..4c7de33b 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -444,7 +444,7 @@ void scriptingEnableGlobalsProtection(lua_State *lua) { s[j++]=NULL; for (j = 0; s[j] != NULL; j++) code = sdscatlen(code,s[j],strlen(s[j])); - luaL_loadbuffer(lua,code,sdslen(code),"enable_strict_lua"); + luaL_loadbuffer(lua,code,sdslen(code),"@enable_strict_lua"); lua_pcall(lua,0,0,0); sdsfree(code); } @@ -525,7 +525,7 @@ void scriptingInit(void) { " if b == false then b = '' end\n" " return aptr,sdslen(body->ptr)); funcdef = sdscatlen(funcdef," end",4); - if (luaL_loadbuffer(lua,funcdef,sdslen(funcdef),"func definition")) { + if (luaL_loadbuffer(lua,funcdef,sdslen(funcdef),"@user_script")) { addReplyErrorFormat(c,"Error compiling script (new function): %s\n", lua_tostring(lua,-1)); lua_pop(lua,1); -- 2.45.2