mirror of
https://github.com/writefreely/writefreely
synced 2024-11-10 19:34:19 +00:00
Log and exit when templates init fails
This commit is contained in:
parent
53a51be578
commit
5c19d249b6
1 changed files with 6 additions and 2 deletions
8
app.go
8
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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue