replaced panic with probe

This commit is contained in:
Anand Babu (AB) Periasamy
2015-08-22 23:26:56 -07:00
parent 099b4478d6
commit f2899ef228
3 changed files with 6 additions and 9 deletions
+2 -3
View File
@@ -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)
}
+2 -3
View File
@@ -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
View File
@@ -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)
}