From 0f1707c75862941e97108689a46cc681a085aed8 Mon Sep 17 00:00:00 2001 From: osmarks Date: Sun, 23 Sep 2018 15:12:16 +0000 Subject: [PATCH] Update 'lib.lua' --- lib.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lib.lua b/lib.lua index 2017225..34d1062 100644 --- a/lib.lua +++ b/lib.lua @@ -27,6 +27,7 @@ local errors = { -- Converts an error into human-readable format errors.format = function(e) + if type(e) == "string" then return e end if not (e.type and e.type == "error" and e.data and e.error) then return "Provided error is not an error object." end if e.error == errors.INTERNAL then return "Internal error - provided info: " .. textutils.serialise(e.data) .. "."