public int run(String[] argv) { LinkedList<String> args = new LinkedList<String>(); for (int j = 0; j < argv.length; ++j) { args.add(argv[j]); } DebugCommand command = popCommand(args); if (command == null) { printUsage(); return 0; } try { return command.run(args); } catch (IOException e) { System.err.println("IOException: " + StringUtils.stringifyException(e)); return 1; } catch (RuntimeException e) { System.err.println("RuntimeException: " + StringUtils.stringifyException(e)); return 1; } }
public int run(String[] argv) { LinkedList<String> args = new LinkedList<String>(); for (int j = 0; j < argv.length; ++j) { args.add(argv[j]); } DebugCommand command = popCommand(args); if (command == null) { printUsage(); return 0; } try { return command.run(args); } catch (IOException e) { System.err.println("IOException: " + StringUtils.stringifyException(e)); return 1; } catch (RuntimeException e) { System.err.println("RuntimeException: " + StringUtils.stringifyException(e)); return 1; } }
public int run(String[] argv) { LinkedList<String> args = new LinkedList<String>(); for (int j = 0; j < argv.length; ++j) { args.add(argv[j]); } DebugCommand command = popCommand(args); if (command == null) { printUsage(); return 0; } try { return command.run(args); } catch (IOException e) { System.err.println("IOException: " + StringUtils.stringifyException(e)); return 1; } catch (RuntimeException e) { System.err.println("RuntimeException: " + StringUtils.stringifyException(e)); return 1; } }