diff options
author | enahum <nahumhbl@gmail.com> | 2016-06-20 12:14:02 -0300 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-06-20 09:14:02 -0600 |
commit | 1ac3bfa603ef0a5822d7e775c085c3f02fdde359 (patch) | |
tree | e07434e00f37a89061dbbd27e9d8b9916866c704 /mattermost.go | |
parent | 8c8344fc41f680ff959db4b9b061e5cd9e7848bd (diff) | |
download | chat-1ac3bfa603ef0a5822d7e775c085c3f02fdde359.tar.gz chat-1ac3bfa603ef0a5822d7e775c085c3f02fdde359.tar.bz2 chat-1ac3bfa603ef0a5822d7e775c085c3f02fdde359.zip |
PLT-3364 Fix panic when load config failes (#3361)
Diffstat (limited to 'mattermost.go')
-rw-r--r-- | mattermost.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mattermost.go b/mattermost.go index 67428275a..963978ecf 100644 --- a/mattermost.go +++ b/mattermost.go @@ -71,7 +71,7 @@ var flagRunCmds bool func doLoadConfig(filename string) (err string) { defer func() { if r := recover(); r != nil { - err = r.(string) + err = fmt.Sprintf("Error loding config, err=%v", r) } }() utils.LoadConfig(filename) @@ -83,7 +83,7 @@ func main() { parseCmds() if errstr := doLoadConfig(flagConfigFile); errstr != "" { - l4g.Exit(utils.T("mattermost.unable_to_load_config"), errstr) + l4g.Exit("Unable to load mattermost configuration file:", errstr) return } @@ -91,6 +91,7 @@ func main() { utils.ConfigureCmdLineLog() } utils.InitTranslations(utils.Cfg.LocalizationSettings) + utils.TestConnection(utils.Cfg) pwd, _ := os.Getwd() l4g.Info(utils.T("mattermost.current_version"), model.CurrentVersion, model.BuildNumber, model.BuildDate, model.BuildHash, model.BuildHashEnterprise) |