diff options
author | Arne Juul <arnej@yahooinc.com> | 2022-10-25 12:05:19 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahooinc.com> | 2022-10-25 12:06:33 +0000 |
commit | b3458e274bdce76dc6f1852388bd5a4c8bcb17f6 (patch) | |
tree | 8a96046643110c33010c429f3bf64bbee4149242 /client | |
parent | 2f414d93e5497999b03843daba613730ac79365d (diff) |
move panic inside the convenience methods
Diffstat (limited to 'client')
-rw-r--r-- | client/go/util/just_exit.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/go/util/just_exit.go b/client/go/util/just_exit.go index a558a32fd11..1fab6cf0b4f 100644 --- a/client/go/util/just_exit.go +++ b/client/go/util/just_exit.go @@ -31,20 +31,20 @@ func (j *JustExitError) Error() string { return j.String() } -func JustExit(message string) *JustExitError { +func JustExitMsg(message string) { trace.Trace("just exit with message") j := JustExitError{ err: nil, msg: message, } - return &j + panic(&j) } -func JustExitWith(e error) *JustExitError { +func JustExitWith(e error) { trace.Trace("just exit with error") j := JustExitError{ err: e, msg: "", } - return &j + panic(&j) } |