aboutsummaryrefslogtreecommitdiffstats
path: root/util/error.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-12-08 17:00:45 +0100
committerKim Alvefur <zash@zash.se>2019-12-08 17:00:45 +0100
commita55d83ceb62bf0e8280829629782bc367ab185b8 (patch)
tree801080b0c6c4e2bf0e719dbf5284aea541f5f96d /util/error.lua
parent9a041bb926ec6596572911b864dd3002d7798dad (diff)
downloadprosody-a55d83ceb62bf0e8280829629782bc367ab185b8.tar.gz
prosody-a55d83ceb62bf0e8280829629782bc367ab185b8.zip
util.error: Write down some thoughts in comments
Diffstat (limited to 'util/error.lua')
-rw-r--r--util/error.lua7
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({