Software /
code /
prosody
Changeset
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 | 10492:8e1d9bba9244 |
children | 10494:69e55b03d5cf |
files | util/error.lua |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
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({