mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
cleanup: do not panic when the metricspath is not a valid URL
When the cephcsi executable receives an error when calling util.ValidateURL() on the optional "metricspath". The error that util.ValidateURL() returns should be understandable enough, so that users know what to investigate. A Go panic on a user error is not very userfriendly, and does not provide any additional usefil information. Signed-off-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
23817c1a83
commit
86a8d29bd1
@ -162,7 +162,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
err = util.ValidateURL(&conf)
|
err = util.ValidateURL(&conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Fatalln(err)
|
logAndExit(err.Error())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user