Changeset

11211:1151140fc757

Merge 0.11->trunk
author Matthew Wild <mwild1@gmail.com>
date Mon, 23 Nov 2020 20:39:47 +0000
parents 11209:f6661fac7e9a (current diff) 11210:75636bf13bf0 (diff)
children 11214:5fb6563eee1e
files util/promise.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/promise.lua	Sun Nov 22 00:52:49 2020 +0100
+++ b/util/promise.lua	Mon Nov 23 20:39:47 2020 +0000
@@ -81,7 +81,7 @@
 	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