File

util/xpcall.lua @ 13038:83b93ad08b23

util.human.io: Pass expected width to mapper function In order to allow it to adjust its output to available space, apply its own ellipsis method or other compacting method.
author Kim Alvefur <zash@zash.se>
date Fri, 07 Apr 2023 13:00:00 +0200
parent 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"prosody.util.compat".xpcall;
end

return {
	xpcall = xpcall;
};