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() {
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user