Mercurial > prosody-hg
view util/xpcall.lua @ 11078:fb3aec3dbe21
util.error: Have init() return an object to allow API extensibility via additional methods
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 25 Sep 2020 12:32:43 +0100 |
| parents | cfc7b2f7251e |
| children | 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; };
