Commits

Josh Rickmar committed 15ce0ab

Check the return value when executing the template

Comments (0)

Files changed (1)

 		buf := new(bytes.Buffer)
 		mdParser.Markdown(src, markdown.ToHTML(buf))
 		pageElems.Main = template.HTML(buf.String())
-		tmplParser.Execute(dest, pageElems)
+		if err = tmplParser.Execute(dest, pageElems); err != nil {
+			return fmt.Errorf("Could not parse template for file %s\n", destPath);
+		}
 	default:
 		io.Copy(dest, src)
 	}