Skip to content

Commit

Permalink
+ error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Zholudev committed Apr 16, 2018
1 parent 148ac0e commit 9504343
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/configprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ func (cp *ConfigProvider) Initialize(configFile string) error {
if data, err := ioutil.ReadFile(configFile); err != nil {
return err
} else {
yaml.Unmarshal(data, &cp.ConfigData)
err = yaml.Unmarshal(data, &cp.ConfigData)
if err != nil {
return err
}

cp.ConfigFile = configFile
}

Expand Down
4 changes: 3 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ func main() {
}

conf := L.ConfigProvider{}
conf.Initialize(configFile)
if err := conf.Initialize(configFile); err != nil {
notifyError(err)
}

imagick.Initialize()
defer imagick.Terminate()
Expand Down

0 comments on commit 9504343

Please sign in to comment.