Software /
code /
prosody
Diff
util/promise.lua @ 9562:acf74ad0b795
Many things: switch from hacky multi-arg xpcall implementations to a standard util.xpcall
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 26 Oct 2018 19:32:00 +0100 |
parent | 9559:7c65e3f38e6e |
child | 9745:0dbb285f903e |
child | 11210:75636bf13bf0 |
line wrap: on
line diff
--- a/util/promise.lua Fri Oct 26 19:29:08 2018 +0100 +++ b/util/promise.lua Fri Oct 26 19:32:00 2018 +0100 @@ -1,6 +1,8 @@ local promise_methods = {}; local promise_mt = { __name = "promise", __index = promise_methods }; +local xpcall = require "util.xpcall".xpcall; + function promise_mt:__tostring() return "promise (" .. (self._state or "invalid") .. ")"; end