diff --git a/glass/skooma/html.lua b/glass/skooma/html.lua index 626ec5b..8d35a2c 100644 --- a/glass/skooma/html.lua +++ b/glass/skooma/html.lua @@ -17,7 +17,10 @@ end}) -- @function load return function(name) name = tostring(name)..'.html.skooma' - local template = loadfile(name, "t", env) + local template, err = loadfile(name, "t", env) + if template == nil then + return nil, err + end if setfenv then setfenv(template, env) end diff --git a/glass/skooma/xml.lua b/glass/skooma/xml.lua index 78bbc4d..6c0a6b6 100644 --- a/glass/skooma/xml.lua +++ b/glass/skooma/xml.lua @@ -17,7 +17,10 @@ end}) -- @function load return function(name) name = tostring(name)..'.xml.skooma' - local template = loadfile(name, "t", env) + local template, err = loadfile(name, "t", env) + if template == nil then + return nil, err + end if setfenv then setfenv(template, env) end