aboutsummaryrefslogtreecommitdiffstats
path: root/util
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
commitb55922a55a4d53d1106c6c2d2da6705a23abe63a (patch)
tree9698c3272523d7c7e7647f42bd527e50eb1989ee /util
parent4c05447b5eacca6de6398666c85b73df4549bb83 (diff)
downloadprosody-b55922a55a4d53d1106c6c2d2da6705a23abe63a.tar.gz
prosody-b55922a55a4d53d1106c6c2d2da6705a23abe63a.zip
util.error: Add unique 'instance_id' to error objects
Diffstat (limited to 'util')
-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;