private static int handleCliArgsException(CliArgsException e) { LOG.error("Could not parse the command line arguments.", e); System.out.println(e.getMessage()); System.out.println(); System.out.println("Use the help option (-h or --help) to get help on the command."); return 1; }
/** * Displays an exception message for incorrect command line arguments. * * @param e The exception to display. * @return The return code for the process. */ private static int handleArgException(CliArgsException e) { LOG.error("Invalid command line arguments.", e); System.out.println(e.getMessage()); System.out.println(); System.out.println("Use the help option (-h or --help) to get help on the command."); return 1; }
@Test public void testTriggerSavepointFailureIllegalJobID() throws Exception { replaceStdOutAndStdErr(); try { CliFrontend frontend = new MockedCliFrontend(new StandaloneClusterClient( getConfiguration(), new TestingHighAvailabilityServices(), false)); String[] parameters = { "invalid job id" }; try { frontend.savepoint(parameters); fail("Should have failed."); } catch (CliArgsException e) { assertThat(e.getMessage(), Matchers.containsString("Cannot parse JobID")); } } finally { restoreStdOutAndStdErr(); } }
private static int handleCliArgsException(CliArgsException e) { LOG.error("Could not parse the command line arguments.", e); System.out.println(e.getMessage()); System.out.println(); System.out.println("Use the help option (-h or --help) to get help on the command."); return 1; }
private static int handleCliArgsException(CliArgsException e) { LOG.error("Could not parse the command line arguments.", e); System.out.println(e.getMessage()); System.out.println(); System.out.println("Use the help option (-h or --help) to get help on the command."); return 1; }
/** * Displays an exception message for incorrect command line arguments. * * @param e The exception to display. * @return The return code for the process. */ private static int handleArgException(CliArgsException e) { LOG.error("Invalid command line arguments.", e); System.out.println(e.getMessage()); System.out.println(); System.out.println("Use the help option (-h or --help) to get help on the command."); return 1; }
/** * Displays an exception message for incorrect command line arguments. * * @param e The exception to display. * @return The return code for the process. */ private static int handleArgException(CliArgsException e) { LOG.error("Invalid command line arguments.", e); System.out.println(e.getMessage()); System.out.println(); System.out.println("Use the help option (-h or --help) to get help on the command."); return 1; }