Browse Source

Use builtin panic

pull/1284/head
Alexander Simmerl 6 years ago
parent
commit
8e1856a90a
No known key found for this signature in database GPG Key ID: 4694E95C9CC61BDA
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      types/priv_validator/json.go

+ 3
- 3
types/priv_validator/json.go View File

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


Loading…
Cancel
Save