util/xpcall.lua
author Matthew Wild <mwild1@gmail.com>
Thu, 06 Oct 2022 11:12:57 +0100
changeset 12745 7b3deafb9162
parent 9564 cfc7b2f7251e
child 12979 d10957394a3c
permissions -rw-r--r--
prosodyctl: check turn: More clearly indicate the error is from TURN server

local xpcall = xpcall;

if select(2, xpcall(function (x) return x end, function () end,  "test")) ~= "test" then
	xpcall = require"util.compat".xpcall;
end

return {
	xpcall = xpcall;
};