[crush] Improve error messages.

master
Lorenzo Cogotti 2 years ago
parent 851cf03672
commit a1f4841066

@ -214,7 +214,7 @@ local function scandeps(manifest, mode, deps)
error(def) -- def is now pcall()'s error message error(def) -- def is now pcall()'s error message
end end
if type(def) ~= 'table' then 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 end
for name,url in pairs(def) do for name,url in pairs(def) do
@ -223,7 +223,7 @@ local function scandeps(manifest, mode, deps)
end end
if type(url) ~= 'string' then 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 end
for i in ipairs(deps) do for i in ipairs(deps) do
@ -232,7 +232,7 @@ local function scandeps(manifest, mode, deps)
goto skip goto skip
end end
error(manifest..": Duplicate dependency '"..name.."'.") error("[string \""..manifest.."\"]: "..name..": Duplicate dependency.")
end end
end end

Loading…
Cancel
Save