Skip to content

Commit

Permalink
templates: Improve error message if Views directory does not exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
roblillack committed May 2, 2022
1 parent 5bad6b4 commit 067e9f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion template.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ func (loader *TemplateLoader) Refresh() error {
var templateWalker func(path string, info os.FileInfo, err error) error
templateWalker = func(path string, info os.FileInfo, err error) error {
if err != nil {
ERROR.Println("error walking templates:", err)
if os.IsNotExist(err) {
WARN.Println("Template directory does not exist.")
} else {
ERROR.Println("error walking templates:", err)
}
return nil
}

Expand Down

0 comments on commit 067e9f5

Please sign in to comment.