mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-06 12:02:13 +00:00
Use builtin panic
This commit is contained in:
parent
ca619c80b6
commit
8e1856a90a
@ -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…
x
Reference in New Issue
Block a user