code: private static int handleError(Throwable t) {
  		LOG.error("Error while running the command.", t);
  
  		System.err.println();
  		System.err.println("------------------------------------------------------------");
  		System.err.println(" The program finished with the following exception:");
  		System.err.println();
  
  		if (t.getCause() instanceof InvalidProgramException) {
  			System.err.println(t.getCause().getMessage());
  			StackTraceElement[] trace = t.getCause().getStackTrace();
  			for (StackTraceElement ele: trace) {
  				System.err.println("\t" + ele);
  				if (ele.getMethodName().equals("main")) {
  					break;
  				}
  			}
  		} else {
  			t.printStackTrace();
  		}
  		return 1;
  	}
docs: Displays an exception message.
  
  @param t The exception to display.
  @return The return code for the process.