File

util/xpcall.lua @ 11664:d83f8f44caea

mod_http_errors: Set status code 200 from root page It isn't quite an error.
author Kim Alvefur <zash@zash.se>
date Fri, 09 Jul 2021 22:06:58 +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;
};