more useful message if template is not found: utils.quit() borked
This commit is contained in:
parent
7b69e259fd
commit
4fd3c78388
6
ldoc.lua
6
ldoc.lua
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue