local function v(v,...)local S,f=pack(...)local H=function()return v(unpack(f,1,S))end local u,q=pack(xpcall(H,debug.traceback))if PROMISE_DEBUG and not q[1]then warn(q[2])end return u,q end

local function wpcallPacked(f, ...)
	local argsLength, args = pack(...)

	local body = function()
		return f(unpack(args, 1, argsLength))
	end

	local resultLength, result = pack(xpcall(body, debug.traceback))

	-- If promise debugging is on, warn whenever a pcall fails.
	-- This is useful for debugging issues within the Promise implementation
	-- itself.
	if PROMISE_DEBUG and not result[1] then
		warn(result[2])
	end

	return resultLength, result
end
