util.error: Simplify error creation - remove ability to set context from templates, and remove default context
authorMatthew Wild <mwild1@gmail.com>
Fri, 25 Sep 2020 12:19:30 +0100
changeset 11080 505c3e5907a5
parent 11079 d8fad2b48b05
child 11081 8ea430de5fd3
util.error: Simplify error creation - remove ability to set context from templates, and remove default context
util/error.lua
--- a/util/error.lua	Fri Sep 25 12:18:18 2020 +0100
+++ b/util/error.lua	Fri Sep 25 12:19:30 2020 +0100
@@ -36,7 +36,7 @@
 
 local function new(e, context, registry, source)
 	local template = (registry and registry[e]) or e or {};
-	context = context or template.context or { _error_id = e };
+	context = context or {};
 
 	if auto_inject_traceback then
 		context.traceback = debug.traceback("error stack", 2);