-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Script reply errors cleanup and stats #10279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -247,7 +247,7 @@ void scriptingInit(int setup) { | |
| " i = dbg.getinfo(3,'nSl')\n" | ||
| " end\n" | ||
| " if i then\n" | ||
| " return i.source .. ':' .. i.currentline .. ': ' .. err\n" | ||
| " return err .. '. ' .. i.source .. ':' .. i.currentline\n" | ||
| " else\n" | ||
| " return err\n" | ||
| " end\n" | ||
|
|
@@ -392,7 +392,7 @@ sds luaCreateFunction(client *c, robj *body) { | |
| if (luaL_loadbuffer(lctx.lua,funcdef,sdslen(funcdef),"@user_script")) { | ||
| if (c != NULL) { | ||
| addReplyErrorFormat(c, | ||
| "Error compiling script (new function): %s\n", | ||
| "Error compiling script (new function): %s", | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MeirShpilraien why are the newlines here? (and in the other error below, and similar one in script_lua.c) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here its not needed, above I guess you mean here: https://github.com/redis/redis/pull/10279/files#diff-3f6891fec05432f415cfd49150db67e2bc72d20e0a94a4e3ac762f7ff55f9921R250 ?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i mean that i think you should mirror these 3 changes (trimming excessive newline in 3 places) to your PR (the one that replaces this one) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, will add it. |
||
| lua_tostring(lctx.lua,-1)); | ||
| } | ||
| lua_pop(lctx.lua,1); | ||
|
|
@@ -403,8 +403,9 @@ sds luaCreateFunction(client *c, robj *body) { | |
|
|
||
| if (lua_pcall(lctx.lua,0,0,0)) { | ||
| if (c != NULL) { | ||
| addReplyErrorFormat(c,"Error running script (new function): %s\n", | ||
| lua_tostring(lctx.lua,-1)); | ||
| const char* errstr = lua_tostring(lctx.lua,-1); | ||
| addReplyErrorFormat(c,"-%s. Error running script (new function)", | ||
| errstr); | ||
| } | ||
| lua_pop(lctx.lua,1); | ||
| return NULL; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -476,7 +476,7 @@ int luaEngineInitEngine() { | |
| " i = dbg.getinfo(3,'nSl')\n" | ||
| " end\n" | ||
| " if i then\n" | ||
| " return i.source .. ':' .. i.currentline .. ': ' .. err\n" | ||
| " return err .. '. ' .. i.source .. ':' .. i.currentline\n" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets try to use this PR to unify this with the |
||
| " else\n" | ||
| " return err\n" | ||
| " end\n" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is a bit nicer: