more useful message if template is not found: utils.quit() borked

This commit is contained in:
steve donovan 2011-06-21 18:02:21 +02:00
parent 7b69e259fd
commit 4fd3c78388
2 changed files with 5 additions and 3 deletions

View File

@ -452,7 +452,7 @@ elseif path.isfile(args.file) then
F = read_file(args.file,ftype)
extract_modules(F)
else
quit ("file or directory does not exist")
quit ("file or directory does not exist: "..quote(args.file))
end
local project = ProjectMap()
@ -568,7 +568,9 @@ if args.style == '!' then args.style = ldoc_html end
if args.template == '!' then args.template = ldoc_html end
local module_template,err = utils.readfile (path.join(args.template,templ))
if not module_template then quit(err) end
if not module_template then
quit("template not found. Use -l to specify directory containing ldoc.ltp")
end
if args.format ~= 'plain' then
local ok,markup = pcall(require,args.format)

View File

@ -176,7 +176,7 @@ function M.check_file (f,original)
text,err = utils.writefile(f,text)
end
if err then
quit("Could not copy %s to %s: %s",original,f,err)
quit("Could not copy "..original.." to "..f)
end
--- this baby from PL is borked on Windows systems w/out Alien
--- if the path is relative