On error, return error message, not nil
authorScott C Wilson <scottcwilson@gmail.com>
Mon, 20 Jul 2015 01:02:03 +0000 (21:02 -0400)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 20 Jul 2015 12:49:21 +0000 (14:49 +0200)
tpl/template.go

index 357a9fbd2a0aed6df17188c65ceda67bc5f18fa6..97a04344166632474961c7e6f132bf37821f58aa 100644 (file)
@@ -197,7 +197,7 @@ func (t *GoHTMLTemplate) AddTemplateFile(name, baseTemplatePath, path string) er
                compiler := amber.New()
                // Parse the input file
                if err := compiler.ParseFile(path); err != nil {
-                       return nil
+                       return err
                }
 
                if _, err := compiler.CompileWithTemplate(t.New(templateName)); err != nil {