/**
   * Catch an error and write it to a crash
   *
   * @param e The error to catch
   * @param message The error message
   */
  public void catchError(Exception e, String message) {
    LogUtil.err("ex-caught");

    System.out.println(makeCrashReport(name, e));

    String msg;

    try {
      File report = writeError(e);
      msg = "\nThe crash report is in : " + report.getAbsolutePath() + "";
    } catch (IOException e2) {
      LogUtil.err("report-error");
      e.printStackTrace();
      msg = "\nAnd unable to write the crash report :( : " + e2;
    }

    JOptionPane.showMessageDialog(
        null, message + "\n" + e + "\n" + msg, "Error", JOptionPane.ERROR_MESSAGE);

    System.exit(1);
  }