Mercurial > prosody-hg
diff util/error.lua @ 10493:d9132e7412b8
util.error: Write down some thoughts in comments
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 08 Dec 2019 17:00:45 +0100 |
| parents | 744ca71a49f7 |
| children | e8186aba1583 |
line wrap: on
line diff
--- a/util/error.lua Sun Dec 08 14:26:32 2019 +0100 +++ b/util/error.lua Sun Dec 08 17:00:45 2019 +0100 @@ -8,6 +8,13 @@ return getmetatable(e) == error_mt; end +-- Do we want any more well-known fields? +-- Or could we just copy all fields from `e`? +-- Sometimes you want variable details in the `text`, how to handle that? +-- Translations? +-- Should the `type` be restricted to the stanza error types or free-form? +-- What to set `type` to for stream errors or SASL errors? Those don't have a 'type' attr. + local function new(e, context, registry) local template = (registry and registry[e]) or e or {}; return setmetatable({
