cli: don't panic when handling error

Close #2886

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
Ekaterina Pavlova 2024-07-03 14:48:54 +03:00
parent 2f5c26f14b
commit b32e568d21

View file

@ -1,6 +1,7 @@
package main
import (
"fmt"
"os"
"github.com/nspcc-dev/neo-go/cli/app"
@ -10,6 +11,7 @@ func main() {
ctl := app.New()
if err := ctl.Run(os.Args); err != nil {
panic(err)
fmt.Fprintln(ctl.ErrWriter, err)
os.Exit(1)
}
}