mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-07 05:46:32 +00:00
libs/os: remove arbitrary os.Exit (#7284)
I think calling os.Exit at arbitrary points is _bad_ and is good to delete. I think panics in the case of data courruption have a chance of providing useful information.
This commit is contained in:
@@ -29,11 +29,6 @@ func TrapSignal(logger logger, cb func()) {
|
||||
}()
|
||||
}
|
||||
|
||||
func Exit(s string) {
|
||||
fmt.Printf(s + "\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// EnsureDir ensures the given directory exists, creating it if necessary.
|
||||
// Errors if the path already exists as a non-directory.
|
||||
func EnsureDir(dir string, mode os.FileMode) error {
|
||||
|
||||
Reference in New Issue
Block a user