Merge pull request #190 from mooffie/template_error

Show exact error when template loading fails
This commit is contained in:
Steve J Donovan 2014-12-26 17:08:12 +02:00
commit 1a2503ad54
1 changed files with 1 additions and 1 deletions

View File

@ -753,7 +753,7 @@ if builtin_style or builtin_template then
local function tmpwrite (name) local function tmpwrite (name)
local ok,text = pcall(require,'ldoc.html.'..name:gsub('%.','_')) local ok,text = pcall(require,'ldoc.html.'..name:gsub('%.','_'))
if not ok then if not ok then
quit("cannot find builtin template "..name) quit("cannot find builtin template "..name.." ("..text..")")
end end
if not utils.writefile(path.join(tmpdir,name),text) then if not utils.writefile(path.join(tmpdir,name),text) then
quit("cannot write to temp directory "..tmpdir) quit("cannot write to temp directory "..tmpdir)