Skip to content

Commit

Permalink
Don't panic in case of other error types in NewtUsage
Browse files Browse the repository at this point in the history
It does not make sense to panic before printing error
  • Loading branch information
m-gorecki authored and kasjer committed Apr 26, 2024
1 parent 3e0e3d8 commit 1686c67
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions newt/cli/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ func NewtUsage(cmd *cobra.Command, err error) {
log.Debugf("%+v", err)
} else if ne, ok := err.(*util.NewtError); ok {
log.Debugf("%s", ne.StackTrace)
} else {
panic(fmt.Sprintf("unexpected error type: %T", err))
}

fmt.Fprintf(os.Stderr, "Error: %s\n", err.Error())
Expand Down

0 comments on commit 1686c67

Please sign in to comment.