diff --git a/config-main.go b/config-main.go index 40f5ef3d..754b8920 100644 --- a/config-main.go +++ b/config-main.go @@ -74,7 +74,7 @@ func (a AliasMessage) String() string { } jsonMessageBytes, err := json.Marshal(a) if err != nil { - panic(err) + fatalIf(probe.NewError(e), "Unable to marshall into JSON.") } return string(jsonMessageBytes) } diff --git a/ls.go b/ls.go index 526ef05b..b87e5e7c 100644 --- a/ls.go +++ b/ls.go @@ -58,7 +58,7 @@ func (c ContentMessage) String() string { } jsonMessageBytes, err := json.Marshal(c) if err != nil { - panic(err) + fatalIf(probe.NewError(e), "Unable to marshall into JSON.") } return string(jsonMessageBytes) } diff --git a/mirror-url.go b/mirror-url.go index 2b662550..1f6adc35 100644 --- a/mirror-url.go +++ b/mirror-url.go @@ -60,7 +60,7 @@ func (s MirrorMessage) String() string { } mirrorMessageBytes, err := json.Marshal(s) if err != nil { - panic(err) + fatalIf(probe.NewError(e), "Unable to marshall into JSON.") } return string(mirrorMessageBytes) }