give some hints if we fail to load HTML templates

Fixes #986

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-09-14 12:25:19 +02:00
parent f8a19f747d
commit 5eca73a399
5 changed files with 16 additions and 8 deletions

View File

@@ -74,8 +74,9 @@ func LoadTemplate(base *template.Template, paths ...string) *template.Template {
if err != nil {
logger.ErrorToConsole("error loading required template: %v", err)
logger.ErrorToConsole(templateLoadErrorHints)
logger.Error(logSender, "", "error loading required template: %v", err)
panic(err)
os.Exit(1)
}
return t
}