From 136c4983690a8450a3f8e4d8050471d4ddafd75f Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Sat, 16 Sep 2017 21:29:46 +0200 Subject: [PATCH] Fixed formatting of info function --- errors.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/errors.lua b/errors.lua index 386bc59..5340a15 100644 --- a/errors.lua +++ b/errors.lua @@ -162,7 +162,8 @@ return function (module_name) function err_hdl.info (...) local args = {...} if args[1] == err_hdl then table.remove(args, 1) end - return io.write(string.format(unpack(args))) + assert(type(args[1]) == 'string') + return io.write(('[%s]: '..args[1]..'\n'):format(err_hdl.module_name, unpack(args, 2))) end function err_hdl.register (...)