# HG changeset patch # User Kim Alvefur # Date 1575820845 -3600 # Node ID d9132e7412b817bb5b22d08f3bb4e5be4ee7101f # Parent 8e1d9bba924488a8741806d049a679ef2af38274 util.error: Write down some thoughts in comments diff -r 8e1d9bba9244 -r d9132e7412b8 util/error.lua --- 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({