libs/web: rewrite template engine, merge lmo library
[project/luci.git] / libs / web / luasrc / template.lua
index 962c2ea8863809ebe688006d3f451880e73e8ada..72127d1df1839b05ac4a0db54d1b9ee229ae7ec7 100644 (file)
@@ -79,9 +79,8 @@ function Template.__init__(self, name)
                -- If we have no valid template throw error, otherwise cache the template
                if not self.template then
                        error("Failed to load template '" .. name .. "'.\n" ..
-                             "Error while parsing template '" .. sourcefile .. "'.\n" ..
-                             "A syntax error occured near '" ..
-                             (err or "(nil)"):gsub("\t", "\\t"):gsub("\n", "\\n") .. "'.")
+                             "Error while parsing template '" .. sourcefile .. "':\n" ..
+                             (err or "Unknown syntax error"))
                else
                        self.cache[name] = self.template
                end