diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-12-02 13:25:50 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2019-12-02 13:25:50 +0300 |
commit | 1d550ef24d760535d4469e19963e897fa63da43d (patch) | |
tree | b7715c4af37953d6c00d45ccd050665b242e8e78 /app.go | |
parent | b535811a888f52fc44925cc7abd3295b0e44903e (diff) |
Improve error handing when creating new domains config source
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -413,9 +413,14 @@ func (a *theApp) listenMetricsFD(wg *sync.WaitGroup, fd uintptr) { } func runApp(config appConfig) { - a := theApp{appConfig: config, domains: source.NewDomains(config)} + domains, err := source.NewDomains(config) + if err != nil { + log.WithError(err).Fatal("could not create domains config source") + } + + a := theApp{appConfig: config, domains: domains} - err := logging.ConfigureLogging(a.LogFormat, a.LogVerbose) + err = logging.ConfigureLogging(a.LogFormat, a.LogVerbose) if err != nil { log.WithError(err).Fatal("Failed to initialize logging") } |