protected void start(String[] args) { int result = 1; try { System.out.println(); result = runBase(args); } catch (CliException e) { System.err.println(); System.err.println(e.getMessage()); System.exit(e.getExitCode()); } catch (Throwable t) { reportThrowable(t); } finally { try { cleanup(); } catch (Throwable t) { System.err.println("Error during cleanup:"); t.printStackTrace(); } } System.out.println(); if (result != 0) { System.exit(result); } }