private static String buildMessage(String systemID, int lineNr, Exception e, String msg, boolean reportParams) {
    String str = msg;

    if (reportParams) {
      if (systemID != null) {
        str += ", SystemID='" + systemID + "'";
      }

      if (lineNr >= 0) {
        str += ", Line=" + lineNr;
      }

      if (e != null) {
        str += ", Exception: " + e;
      }
    }

    return str;
  }
private static String buildMessage(String systemID, int lineNr, Exception e, String msg, boolean reportParams)