Use builtin panic

This commit is contained in:
Alexander Simmerl 2018-03-06 16:12:57 +01:00
parent ca619c80b6
commit 8e1856a90a
No known key found for this signature in database
GPG Key ID: 4694E95C9CC61BDA
1 changed files with 3 additions and 3 deletions

View File

@ -90,17 +90,17 @@ func (pvj *PrivValidatorJSON) Save() {
func (pvj *PrivValidatorJSON) save() { func (pvj *PrivValidatorJSON) save() {
if pvj.filePath == "" { if pvj.filePath == "" {
cmn.PanicSanity("Cannot save PrivValidator: filePath not set") panic("Cannot save PrivValidator: filePath not set")
} }
jsonBytes, err := json.Marshal(pvj) jsonBytes, err := json.Marshal(pvj)
if err != nil { if err != nil {
// ; BOOM!!! // ; BOOM!!!
cmn.PanicCrisis(err) panic(err)
} }
err = cmn.WriteFileAtomic(pvj.filePath, jsonBytes, 0600) err = cmn.WriteFileAtomic(pvj.filePath, jsonBytes, 0600)
if err != nil { if err != nil {
// ; BOOM!!! // ; BOOM!!!
cmn.PanicCrisis(err) panic(err)
} }
} }