From 2d6d4edc70864a3e8c0467a0ff3efa7e6fa2cf8a Mon Sep 17 00:00:00 2001 From: daria-lewandowska Date: Mon, 26 Sep 2016 13:12:32 +0200 Subject: [PATCH] better error handling when incorrect config file --- novaplugin/plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/novaplugin/plugin.go b/novaplugin/plugin.go index 8f298b0..4b95abd 100644 --- a/novaplugin/plugin.go +++ b/novaplugin/plugin.go @@ -288,7 +288,7 @@ func (self *NovaPlugin) init(cfg interface{}) error { err := ReadConfig(cfg, &self.config) if err != nil { - panic(fmt.Errorf("plugin initalization failed : [%v]", err)) + return err } // testingCollector is a variable that might either be newCollector