mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-03 02:42:19 +08:00
fix: fix the error output format
This commit is contained in:
parent
80c4b6ce7b
commit
0ae6336501
@ -15,7 +15,6 @@
|
||||
package genutil
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -42,11 +41,8 @@ func OutDir(path string) (string, error) {
|
||||
}
|
||||
|
||||
func ExitWithError(err error) {
|
||||
if errors.Is(err, errors.New("SIGTERM EXIT")) {
|
||||
os.Exit(-1)
|
||||
}
|
||||
progName := filepath.Base(os.Args[0])
|
||||
fmt.Fprintf(os.Stderr, "\n\n%s exit -1: \n%+v\n\n", progName, err)
|
||||
fmt.Fprintf(os.Stderr, "%s exit -1: %+v\n", progName, err)
|
||||
os.Exit(-1)
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user