aboutsummaryrefslogtreecommitdiffstats
path: root/util/error.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2020-09-25 12:18:18 +0100
committerMatthew Wild <mwild1@gmail.com>2020-09-25 12:18:18 +0100
commit646bd1da3df6ca12ea02e036ed2af9b8e9eb173d (patch)
tree9698c3272523d7c7e7647f42bd527e50eb1989ee /util/error.lua
parent585dd2880b3693c0df599908289b1bba97621580 (diff)
downloadprosody-646bd1da3df6ca12ea02e036ed2af9b8e9eb173d.tar.gz
prosody-646bd1da3df6ca12ea02e036ed2af9b8e9eb173d.zip
util.error: Add unique 'instance_id' to error objects
Diffstat (limited to 'util/error.lua')
-rw-r--r--util/error.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/error.lua b/util/error.lua
index c46f8790..2c96bc03 100644
--- a/util/error.lua
+++ b/util/error.lua
@@ -1,3 +1,4 @@
+local id = require "util.id";
-- Library configuration (see configure())
local auto_inject_traceback = false;
@@ -42,6 +43,7 @@ local function new(e, context, registry, source)
end
return setmetatable({
+ instance_id = id.short();
type = template.type or "cancel";
condition = template.condition or "undefined-condition";
text = template.text;