From a1f484106673d002d6d0b73efb706e5d0fe00716 Mon Sep 17 00:00:00 2001 From: Lorenzo Cogotti Date: Mon, 15 Aug 2022 19:18:03 +0200 Subject: [PATCH] [crush] Improve error messages. --- crush.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crush.lua b/crush.lua index 248e0a3..fb947d8 100644 --- a/crush.lua +++ b/crush.lua @@ -214,7 +214,7 @@ local function scandeps(manifest, mode, deps) error(def) -- def is now pcall()'s error message end if type(def) ~= 'table' then - error("[\""..manifest.."\"] loading file resulted in a '"..type(def).."', 'table' expected.") + error("[string \""..manifest.."\"]: Loading resulted in a '"..type(def).."', while 'table' was expected.") end for name,url in pairs(def) do @@ -223,7 +223,7 @@ local function scandeps(manifest, mode, deps) end if type(url) ~= 'string' then - error(manifest..": unexpected type "..type(dep).." as "..name.." git repository URL.") + error("[string \""..manifest.."\"]: "..name..": git repository URL must be a 'string'.") end for i in ipairs(deps) do @@ -232,7 +232,7 @@ local function scandeps(manifest, mode, deps) goto skip end - error(manifest..": Duplicate dependency '"..name.."'.") + error("[string \""..manifest.."\"]: "..name..": Duplicate dependency.") end end