pojosontheweb / woko

POJOs on the Web !
http://www.pojosontheweb.com
Apache License 2.0
9 stars 1 forks source link

don't show stack trace when command does't exist #118

Closed vankeisb closed 12 years ago

vankeisb commented 12 years ago

When invoking a non existing command a full stack trace is shown. Just show a message instead.

$ woko foobar
__       __     _  __
\ \  _  / /___ | |/ / ___
 \ \/ \/ // o \|   K /   \
  \__W__/ \___/|_|\_\\_o_/  2.0
             POJOs on the Web !

java.lang.IllegalArgumentException: command foobar does not exist
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
    at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:71)
...