From a55d83ceb62bf0e8280829629782bc367ab185b8 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 8 Dec 2019 17:00:45 +0100 Subject: util.error: Write down some thoughts in comments --- util/error.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'util/error.lua') diff --git a/util/error.lua b/util/error.lua index 9ebfa6ab..461bf385 100644 --- a/util/error.lua +++ b/util/error.lua @@ -8,6 +8,13 @@ local function is_err(e) 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({ -- cgit v1.2.3