mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-12-25 15:09:05 +01:00
Catch panic in Nvidia Go Bindings
This commit is contained in:
parent
75f5ac8980
commit
3a13a41a15
@ -21,14 +21,11 @@ type NvidiaCollector struct {
|
||||
config NvidiaCollectorConfig
|
||||
}
|
||||
|
||||
func (m *NvidiaCollector) CatchPanic() error {
|
||||
|
||||
func (m *NvidiaCollector) CatchPanic() {
|
||||
if rerr := recover(); rerr != nil {
|
||||
log.Print("CatchPanic ", string(rerr.(string)))
|
||||
err := errors.New(rerr.(string))
|
||||
return err
|
||||
log.Print(rerr)
|
||||
m.init = false
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *NvidiaCollector) Init(config []byte) error {
|
||||
|
Loading…
Reference in New Issue
Block a user