diff options
Diffstat (limited to 'cmd/util/exit.go')
-rw-r--r-- | cmd/util/exit.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/util/exit.go b/cmd/util/exit.go index 96fcbf3c..8871a483 100644 --- a/cmd/util/exit.go +++ b/cmd/util/exit.go @@ -6,6 +6,10 @@ import ( // ExitWithError prints error and exits with error code`. func ExitWithError(err error) { - Panicf("<red+hb>Error:</reset> <red>%s</reset>\n", err) + errP := Panicf("<red+hb>Error:</reset> <red>%s</reset>\n", err) + if errP != nil { + // in case of error during Panicf, print this error via build-int print function + println("error occurred during fmt.Fprint: " + err.Error()) + } os.Exit(1) } |