diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-10-26 16:09:25 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-10-26 16:09:25 +0100 |
commit | 69900696779c89084fe7e6a5be365b3453222462 (patch) | |
tree | 9b53ced68d79488a09e011a2dab5d479c88e713d /util/promise.lua | |
parent | 8ea77fc0ecec86ae1056e57aba47c44c8cfc35fc (diff) | |
download | prosody-69900696779c89084fe7e6a5be365b3453222462.tar.gz prosody-69900696779c89084fe7e6a5be365b3453222462.zip |
util.promise: Switch from pcall to xpcall to get tracebacks on exceptions
Diffstat (limited to 'util/promise.lua')
-rw-r--r-- | util/promise.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/promise.lua b/util/promise.lua index a3bc59d2..b368f34e 100644 --- a/util/promise.lua +++ b/util/promise.lua @@ -15,7 +15,7 @@ local function wrap_handler(f, resolve, reject, default) return default; end return function (param) - local ok, ret = pcall(f, param); + local ok, ret = xpcall(f, debug.traceback, param); if ok then resolve(ret); else |