Software /
code /
prosody
Changeset
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 | 11077:8ea430de5fd3 |
children | 11079:1e5a0e0469de |
files | util/error.lua |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/util/error.lua Fri Sep 25 12:27:45 2020 +0100 +++ b/util/error.lua Fri Sep 25 12:32:43 2020 +0100 @@ -58,9 +58,11 @@ end local function init(source, registry) - return function (e, context) - return new(e, context, registry, source); - end + return { + new = function (e, context) + return new(e, context, registry, source); + end; + }; end local function coerce(ok, err, ...)