[crush] Improve error messages.

This commit is contained in:
Lorenzo Cogotti 2022-08-15 19:18:03 +02:00
parent 851cf03672
commit a1f4841066
1 changed files with 3 additions and 3 deletions

View File

@ -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