throw new TxnLogToolkitParseException(options, ExitCode.UNEXPECTED_ERROR.getValue(), e.getMessage());
void parse(String[] args) throws TxnLogToolkit.TxnLogToolkitParseException { if (args == null) { throw new TxnLogToolkit.TxnLogToolkitParseException(1, "No arguments given"); force = true; } else { throw new TxnLogToolkit.TxnLogToolkitParseException(1, "Invalid argument: %s", par); force = true; } else { throw new TxnLogToolkit.TxnLogToolkitParseException(1, "Invalid argument: %s", par); throw new TxnLogToolkit.TxnLogToolkitParseException(1, "Invalid arguments: more than one TXN log file given"); throw new TxnLogToolkit.TxnLogToolkitParseException(1, "Invalid arguments: TXN log file name missing");
/** * @param args Command line arguments */ public static void main(String[] args) throws Exception { final TxnLogToolkit lt = parseCommandLine(args); try { lt.dump(new Scanner(System.in)); lt.printStat(); } catch (TxnLogToolkitParseException e) { System.err.println(e.getMessage() + "\n"); printHelpAndExit(e.getExitCode()); } catch (TxnLogToolkitException e) { System.err.println(e.getMessage()); System.exit(e.getExitCode()); } finally { lt.close(); } }
/** * @param args Command line arguments */ public static void main(String[] args) throws Exception { try (final TxnLogToolkit lt = parseCommandLine(args)) { if (lt.isDumpMode()) { lt.dump(new Scanner(System.in)); lt.printStat(); } else { lt.chop(); } } catch (TxnLogToolkitParseException e) { System.err.println(e.getMessage() + "\n"); printHelpAndExit(e.getExitCode(), e.getOptions()); } catch (TxnLogToolkitException e) { System.err.println(e.getMessage()); System.exit(e.getExitCode()); } }