[Asterisk-code-review] pbx lua: Support displaying lua error message if no debug t... (asterisk[master])

Kevin Harwell asteriskteam at digium.com
Thu Apr 26 18:53:06 CDT 2018


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/8862 )

Change subject: pbx_lua:  Support displaying lua error message if no debug table exists
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/8862/1/pbx/pbx_lua.c
File pbx/pbx_lua.c:

https://gerrit.asterisk.org/#/c/8862/1/pbx/pbx_lua.c@810
PS1, Line 810: 		lua_pop(L, 2);
             : 		/*  Keep at least original err message */
             : 		lua_pushvalue(L, message_index);
Maybe I misunderstand (not really familiar with this section of code), but the pop here removes two items off the stack correct? That's removing the "debug" and the "\n"? 

If that's the case I don't think you need to add the value at message_index to the stack here as it should be back at the top of the stack after the call to pop.


https://gerrit.asterisk.org/#/c/8862/1/pbx/pbx_lua.c@818
PS1, Line 818: 		lua_pop(L, 3);
             : 		lua_pushvalue(L, message_index);
Same thing here I believe? I think you can drop the call to pushvalue.



-- 
To view, visit https://gerrit.asterisk.org/8862
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I34ba0a098f1ae06a3af7b4d1b098bd43f42f96c8
Gerrit-Change-Number: 8862
Gerrit-PatchSet: 1
Gerrit-Owner: Christof Lauber <christof.lauber at annax.ch>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Thu, 26 Apr 2018 23:53:06 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180426/6f94370d/attachment.html>


More information about the asterisk-code-review mailing list