From 5c19d249b67a3d550cf58e5263a46af553f60d0e Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Fri, 18 Jan 2019 19:17:10 -0500 Subject: [PATCH] Log and exit when templates init fails --- app.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app.go b/app.go index af7fa72..ddb6e20 100644 --- a/app.go +++ b/app.go @@ -337,11 +337,15 @@ func Serve() { isSingleUser = app.cfg.App.SingleUser app.cfg.Server.Dev = *debugPtr - initTemplates(app.cfg) + err := initTemplates(app.cfg) + if err != nil { + log.Error("load templates: %s", err) + os.Exit(1) + } // Load keys log.Info("Loading encryption keys...") - err := initKeys(app) + err = initKeys(app) if err != nil { log.Error("\n%s\n", err) }