public static List < String > parseOrExit ( Object target , String [ ] args ) { try { return parse ( target , args ) ; } catch ( IllegalArgumentException e ) { System . err . println ( e . getMessage ( ) ) ; Args . usage ( target ) ; System . exit ( 1 ) ; throw e ; } }
A convenience method for parsing and automatically producing error messages .