File

util/xpcall.lua @ 11524:6de302b53a3e

mod_c2s: Port to new OpenMetrics API
author Jonas Schäfer <jonas@wielicki.name>
date Sun, 18 Apr 2021 12:34:17 +0200
parent 9561:cfc7b2f7251e
child 12975:d10957394a3c
line wrap: on
line source

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;
};