Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-12-02 13:25:50 +0300
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-12-02 13:25:50 +0300
commit1d550ef24d760535d4469e19963e897fa63da43d (patch)
treeb7715c4af37953d6c00d45ccd050665b242e8e78 /app.go
parentb535811a888f52fc44925cc7abd3295b0e44903e (diff)
Improve error handing when creating new domains config source
Diffstat (limited to 'app.go')
-rw-r--r--app.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/app.go b/app.go
index eeefaeaf..90b6320d 100644
--- a/app.go
+++ b/app.go
@@ -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")
}