@ SuppressWarnings ( "UseOfSystemOutOrSystemErr" ) private void handleError ( ArgumentParser parser , ArgumentParserException ex ) { System . err . println ( "# " + HELP_ISSUES ) ; System . err . println ( "# " + HELP_WIKI ) ; System . err . println ( "# ---------------------------------------------------------------" ) ; parser . handleError ( ex ) ; }
Use this instead of calling parser . handle error directly . This will print a header with links to jira and documentation before the standard error message is printed .