You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/10/04 03:51:13 UTC
[2/2] incubator-mynewt-newt git commit: newt - Fix crash for
unrecognized commands.
newt - Fix crash for unrecognized commands.
Example:
[ccollins@ccollins-mac:~/go/src/mynewt.apache.org/newt/newt]$ newt asdas
Error: unknown command "asdas" for "newt"
Run 'newt --help' for usage.
panic: interface conversion: error is *errors.errorString, not *util.NewtError
goroutine 1 [running]:
panic(0x5380e0, 0xc820238640)
/usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6
mynewt.apache.org/newt/newt/cli.NewtUsage(0x0, 0xd40000, 0xc820236080)
/Users/ccollins/go/src/mynewt.apache.org/newt/newt/cli/util.go:45 +0x4a7
main.main()
/Users/ccollins/go/src/mynewt.apache.org/newt/newt/newt.go:150 +0x2db
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/b90fb9df
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/b90fb9df
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/b90fb9df
Branch: refs/heads/develop
Commit: b90fb9df81aba46d7b569faadb43475cbc36c542
Parents: 93ec869
Author: Christopher Collins <cc...@apache.org>
Authored: Mon Oct 3 20:50:03 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Mon Oct 3 20:50:30 2016 -0700
----------------------------------------------------------------------
newt/newt.go | 3 ---
1 file changed, 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/b90fb9df/newt/newt.go
----------------------------------------------------------------------
diff --git a/newt/newt.go b/newt/newt.go
index de37ad8..c0327d4 100644
--- a/newt/newt.go
+++ b/newt/newt.go
@@ -146,7 +146,4 @@ func main() {
}
log.SetLevel(hold_lvl)
- if err := cmd.Execute(); err != nil {
- cli.NewtUsage(nil, err)
- }
}