go-godo / godo

golang build tool in the spirt of rake, gulp
MIT License
536 stars 31 forks source link

error message '"foo" task is not defined' is super ugly #45

Open jameshfisher opened 8 years ago

jameshfisher commented 8 years ago

This is not an acceptable user experience:

% godo foo
ERR "foo" task is not defined
panic:

goroutine 1 [running]:
panic(0x18c860, 0xc820011e60)
    /usr/local/Cellar/go/1.6.2/libexec/src/runtime/panic.go:481 +0x3e6
gopkg.in/godo.v2/util.Panic(0x21d230, 0x3, 0x2505c0, 0x19, 0xc820037b28, 0x1, 0x1)
    /Users/jhf/go/src/gopkg.in/godo.v2/util/logging.go:81 +0x1a5
gopkg.in/godo%2ev2.(*Project).mustTask(0xc82000eeb0, 0x7fff5fbffa49, 0x3, 0x10, 0x18c860, 0x0, 0x0)
    /Users/jhf/go/src/gopkg.in/godo.v2/project.go:125 +0x390
gopkg.in/godo%2ev2.(*Project).run(0xc82000eeb0, 0x7fff5fbffa49, 0x3, 0x7fff5fbffa49, 0x3, 0x0, 0x0, 0x0)
    /Users/jhf/go/src/gopkg.in/godo.v2/project.go:233 +0x54
gopkg.in/godo%2ev2.(*Project).Run(0xc82000eeb0, 0x7fff5fbffa49, 0x3, 0x0, 0x0)
    /Users/jhf/go/src/gopkg.in/godo.v2/project.go:158 +0x54
gopkg.in/godo%2ev2.godoExit(0x27e3e0, 0x0, 0x0, 0x0, 0x27e400)
    /Users/jhf/go/src/gopkg.in/godo.v2/runner.go:151 +0xb28
gopkg.in/godo%2ev2.godo(0x27e3e0, 0x0, 0x0, 0x0)
    /Users/jhf/go/src/gopkg.in/godo.v2/runner.go:93 +0x4b
gopkg.in/godo%2ev2.Godo(0x27e3e0)
    /Users/jhf/go/src/gopkg.in/godo.v2/runner.go:89 +0x32
main.main()
    /Users/jhf/go/src/github.com/baz/qux/Gododir/main.go:42 +0x23
2016/05/31 12:43:55 exit status 2