local Q if PROMISE_DEBUG then Q=function(Q,...)local z={pcall(Q,...)}if not z[1]then warn(z[2])end return unpack(z)end else Q=pcall end
-- If promise debugging is on, use a version of pcall that warns on failure.
-- This is useful for finding errors that happen within Promise itself.
local wpcall
if PROMISE_DEBUG then
	wpcall = function(f, ...)
		local result = { pcall(f, ...) }

		if not result[1] then
			warn(result[2])
		end

		return unpack(result)
	end
else
	wpcall = pcall
end
