code: public static void exit(final int exitCode, final Exception ex) {
          System.err.println(JPService.getApplicationName() + " crashed...");
          ExceptionPrinter.printHistory(ex, System.err);
          System.exit(exitCode);
      }
docs: Method exists the application and prints the given exception as error description.
  
  @param ex the reason for the application exit.