Skip to content

Commit 1686c67

Browse files
m-goreckikasjer
authored andcommitted
Don't panic in case of other error types in NewtUsage
It does not make sense to panic before printing error
1 parent 3e0e3d8 commit 1686c67

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

newt/cli/util.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ func NewtUsage(cmd *cobra.Command, err error) {
5050
log.Debugf("%+v", err)
5151
} else if ne, ok := err.(*util.NewtError); ok {
5252
log.Debugf("%s", ne.StackTrace)
53-
} else {
54-
panic(fmt.Sprintf("unexpected error type: %T", err))
5553
}
5654

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

0 commit comments

Comments
 (0)