diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-08-04 11:37:01 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-08-04 11:37:01 +0100 |
commit | a1547bb047dfe66cffa4811d05fb08d98c6d81c6 (patch) | |
tree | 959d13c600dd9d052c97adbcb951bf88977cb200 /lib | |
parent | 5f232e4aaaad5b56d970a425c532e95240f82491 (diff) | |
download | supple-a1547bb047dfe66cffa4811d05fb08d98c6d81c6.tar.gz |
SUPPLE: Refine error reporting a little more
Diffstat (limited to 'lib')
-rw-r--r-- | lib/supple/comms.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/supple/comms.lua b/lib/supple/comms.lua index 25aeb39..d175bff 100644 --- a/lib/supple/comms.lua +++ b/lib/supple/comms.lua @@ -20,6 +20,7 @@ local tonumber = tonumber local error = error local getinfo = debug.getinfo local concat = table.concat +local xpcall = xpcall local fd = -1 @@ -55,9 +56,11 @@ local function captcha(msg) local traceback = {} local level = 2 local info = getinfo(level, "Snlf") - while info do - if info.currentline > 0 and - not info.short_src:match("/supple/[^%.]+%.lua$") then + local function in_supple() + return info.short_src:match("/supple/[^%.]+%.lua$") + end + while info and info.func ~= xpcall do + if info.currentline > 0 and not in_supple() then local ttype, tag = objects.find_tag(info.func) if ttype then info.name = tag |