private static void handle(ParameterException e) { JCommanderWrapper.handle(e, s -> LOG.error("{}", s)); //$NON-NLS-1$ } }
/** * Program entry. * @param args command line tokens */ public static void main(String... args) { try { exec(args); } catch (CommandExecutionException e) { LOG.error("error occurred while executing command", e); System.exit(1); } catch (CommandConfigurationException e) { LOG.error("{}", e.getMessage()); LOG.debug("configuration error detail: {}", Arrays.toString(args), e); System.exit(2); } catch (ParameterException e) { JCommanderWrapper.handle(e, s -> LOG.error("{}", s)); //$NON-NLS-1$ System.exit(3); } }