Diff

util/error.lua @ 10069:6f317e51544d

util.error: Fix traceback due to missing text field
author Kim Alvefur <zash@zash.se>
date Wed, 10 Jul 2019 17:04:36 +0200
parent 9749:9361bd1b9c9b
child 10365:744ca71a49f7
line wrap: on
line diff
--- a/util/error.lua	Fri May 10 01:29:26 2019 +0200
+++ b/util/error.lua	Wed Jul 10 17:04:36 2019 +0200
@@ -1,7 +1,7 @@
 local error_mt = { __name = "error" };
 
 function error_mt:__tostring()
-	return ("error<%s:%s:%s>"):format(self.type, self.condition, self.text);
+	return ("error<%s:%s:%s>"):format(self.type, self.condition, self.text or "");
 end
 
 local function is_err(e)