aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-11-23 20:39:47 +0000
committerMatthew Wild <mwild1@gmail.com>2020-11-23 20:39:47 +0000
commitb90fc1e30c78f7320d7335e85e1aee93520f06ed (patch)
treeca16bfc32d7e97f014505cd18516d998c8e029b7
parent711d451fbf097ff1061bdb02c1bb6d4493776427 (diff)
parent15a1cfbde626b4d8fd416e28a6827899b5bf6763 (diff)
downloadprosody-b90fc1e30c78f7320d7335e85e1aee93520f06ed.tar.gz
prosody-b90fc1e30c78f7320d7335e85e1aee93520f06ed.zip
Merge 0.11->trunk
-rw-r--r--util/promise.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/promise.lua b/util/promise.lua
index 6ebb0dd6..bcb7beda 100644
--- a/util/promise.lua
+++ b/util/promise.lua
@@ -81,7 +81,7 @@ local function new(f)
local p = setmetatable({ _state = "pending", _next = next_pending, _pending_on_fulfilled = {}, _pending_on_rejected = {} }, promise_mt);
if f then
local resolve, reject = new_resolve_functions(p);
- local ok, ret = pcall(f, resolve, reject);
+ local ok, ret = xpcall(f, debug.traceback, resolve, reject);
if not ok and p._state == "pending" then
reject(ret);
end