diff options
author | Kim Alvefur <zash@zash.se> | 2019-12-08 17:00:45 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-12-08 17:00:45 +0100 |
commit | 007f277b1716c5052f3bbf2fba120973440a9f70 (patch) | |
tree | 801080b0c6c4e2bf0e719dbf5284aea541f5f96d /util | |
parent | b7a0a21035b1cf38a1330cba02e1fac2916efa96 (diff) | |
download | prosody-007f277b1716c5052f3bbf2fba120973440a9f70.tar.gz prosody-007f277b1716c5052f3bbf2fba120973440a9f70.zip |
util.error: Write down some thoughts in comments
Diffstat (limited to 'util')
-rw-r--r-- | util/error.lua | 7 |
1 files changed, 7 insertions, 0 deletions
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({ |