replaced panic with probe
This commit is contained in:
+2
-3
@@ -73,9 +73,8 @@ func (a AliasMessage) String() string {
|
||||
return message
|
||||
}
|
||||
jsonMessageBytes, e := json.Marshal(a)
|
||||
if e != nil {
|
||||
fatalIf(probe.NewError(e), "Unable to marshall into JSON.")
|
||||
}
|
||||
fatalIf(probe.NewError(e), "Unable to marshall into JSON.")
|
||||
|
||||
return string(jsonMessageBytes)
|
||||
}
|
||||
|
||||
|
||||
@@ -57,9 +57,8 @@ func (c ContentMessage) String() string {
|
||||
return message
|
||||
}
|
||||
jsonMessageBytes, e := json.Marshal(c)
|
||||
if e != nil {
|
||||
fatalIf(probe.NewError(e), "Unable to marshall into JSON.")
|
||||
}
|
||||
fatalIf(probe.NewError(e), "Unable to marshall into JSON.")
|
||||
|
||||
return string(jsonMessageBytes)
|
||||
}
|
||||
|
||||
|
||||
+2
-3
@@ -59,9 +59,8 @@ func (s MirrorMessage) String() string {
|
||||
return fmt.Sprintf("‘%s’ -> ‘%s’", s.Source, s.Targets)
|
||||
}
|
||||
mirrorMessageBytes, e := json.Marshal(s)
|
||||
if e != nil {
|
||||
fatalIf(probe.NewError(e), "Unable to marshall into JSON.")
|
||||
}
|
||||
fatalIf(probe.NewError(e), "Unable to marshall into JSON.")
|
||||
|
||||
return string(mirrorMessageBytes)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user