Wireshark-commits: [Wireshark-commits] master 6a49c72: wslua: include Lua stack trace in startup er
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Mon, 28 Jan 2019 11:04:30 +0000
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=6a49c72974f657371986d355e8c372ae70b0185e
Submitter: "Peter Wu <peter@xxxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark

Commits:

6a49c72 by Peter Wu (peter@xxxxxxxxxxxxx):

    wslua: include Lua stack trace in startup error messages
    
    Error messages without a stack trace are rather hard to debug for more
    complex Lua dissectors. Be sure to append one, it will look like this:
    
        tshark: Lua: Error during loading:
         /tmp/kdnet/kdnet.lua:13: bad argument #3 to 'proto_field_constructor' (Display must be either base.NONE, base.DOT, base.DASH, base.COLON or base.SPACE)
        stack traceback:
                [C]: in function 'proto_field_constructor'
                /tmp/kdnet/kdnet.lua:13: in function 'add_field'
                /tmp/kdnet/kdnet.lua:35: in function 'add_fields'
                /tmp/kdnet/kdnet.lua:242: in main chunk
    
    It would be nice to reuse the error handler for dissector calls as well,
    but I am not sure whether this works with absolute indices which are
    used almost everywhere in wslua.
    
    Change-Id: I89b2dcd360fce3865e1bf052b9fe03e888aae167
    Reviewed-on: https://code.wireshark.org/review/31763
    Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot
    Reviewed-by: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  6cab8c5   funnel: Fix memleaks in funnel_remove_menu
     add  6a49c72   wslua: include Lua stack trace in startup error messages


Summary of changes:
 epan/wslua/init_wslua.c | 34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)