diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-11-23 20:39:47 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-11-23 20:39:47 +0000 |
commit | 9bcc94bc0c4502370f927df83d1ad006b257153e (patch) | |
tree | ca16bfc32d7e97f014505cd18516d998c8e029b7 | |
parent | 223675b1e7d9e95f43072ac2b975f5c2b01e3f76 (diff) | |
parent | a247cea4dfd98a09f78b5b5bcc2c832e7583b887 (diff) | |
download | prosody-9bcc94bc0c4502370f927df83d1ad006b257153e.tar.gz prosody-9bcc94bc0c4502370f927df83d1ad006b257153e.zip |
Merge 0.11->trunk
-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 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 |