Mercurial > prosody-hg
comparison util/xpcall.lua @ 12975:d10957394a3c
util: Prefix module imports with prosody namespace
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 17 Mar 2023 16:23:16 +0100 |
| parents | cfc7b2f7251e |
| children |
comparison
equal
deleted
inserted
replaced
| 12974:ba409c67353b | 12975:d10957394a3c |
|---|---|
| 1 local xpcall = xpcall; | 1 local xpcall = xpcall; |
| 2 | 2 |
| 3 if select(2, xpcall(function (x) return x end, function () end, "test")) ~= "test" then | 3 if select(2, xpcall(function (x) return x end, function () end, "test")) ~= "test" then |
| 4 xpcall = require"util.compat".xpcall; | 4 xpcall = require"prosody.util.compat".xpcall; |
| 5 end | 5 end |
| 6 | 6 |
| 7 return { | 7 return { |
| 8 xpcall = xpcall; | 8 xpcall = xpcall; |
| 9 }; | 9 }; |
