Diff

util/error.lua @ 11075:d8fad2b48b05

util.error: Add unique 'instance_id' to error objects
author Matthew Wild <mwild1@gmail.com>
date Fri, 25 Sep 2020 12:18:18 +0100
parent 11054:ad07152d7bde
child 11076:505c3e5907a5
line wrap: on
line diff
--- a/util/error.lua	Sat Sep 19 20:49:24 2020 +0100
+++ b/util/error.lua	Fri Sep 25 12:18:18 2020 +0100
@@ -1,3 +1,4 @@
+local id = require "util.id";
 
 -- Library configuration (see configure())
 local auto_inject_traceback = false;
@@ -42,6 +43,7 @@
 	end
 
 	return setmetatable({
+		instance_id = id.short();
 		type = template.type or "cancel";
 		condition = template.condition or "undefined-condition";
 		text = template.text;