libs/web: Fixed a typo in template error handling
[project/luci.git] / libs / web / luasrc / template.lua
index e78bfb6..98e60f7 100644 (file)
@@ -246,7 +246,7 @@ function Template.render(self, scope)
        local stat, err = util.copcall(self.template)
        if not stat then
                setfenv(self.template, oldfenv)
-               error("Error in template %s: %s" % {self.name, chunk})
+               error("Error in template %s: %s" % {self.name, err})
        end
        
        -- Reset environment