From d8bb1e9fd644577486b94eb461537b70c6935ced Mon Sep 17 00:00:00 2001 From: "Anand Babu (AB) Periasamy" Date: Sat, 22 Aug 2015 23:22:17 -0700 Subject: [PATCH] replaced panic with probe --- config-main.go | 2 +- ls.go | 2 +- mirror-url.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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) }