if (re.getMessage().indexOf("Assertion botch:") > -1) { String errorString = "Assertion Botch: start time: " + startTime; errorString += (" end time: " + TaskUtils.getEndTime(aTask)); double d = taskUtils.getQuantity(aTask); long dbits = Double.doubleToLongBits(d); long rbits = Double.doubleToRawLongBits(d); errorString += ("quantity_d: " + Long.toHexString(dbits)); errorString += ("quantity_r: " + Long.toHexString(rbits)); logger.error(errorString); } throw re;
if (re.getMessage().indexOf("Assertion botch:") > -1) { taskStr = taskStr + "Assertion botch!";  String itemId = taskUtils.getTaskItemName(aTask); TypeIdentificationPG typeIdPG = logInvPG.getResource().getTypeIdentificationPG(); String nomenclature= null; String orgId = logInvPG.getOrg().getItemIdentificationPG().getItemIdentification(); if (typeIdPG == null) { logger.warn("No typeIdentificationPG for asset"); } else { nomenclature = typeIdPG.getNomenclature(); } if (nomenclature == null) { nomenclature = itemId; } String errorString = "Assertion Botch: start time: " + getDateString(startTime,true); errorString += (" end time: " + getDateString(TaskUtils.getEndTime(aTask),true)); errorString += (" UID: " + aTask.getUID()); errorString += (" NSN: " + itemId + ":" + nomenclature); errorString += (" at Org " + orgId + " "); double dQuantity = taskUtils.getDailyQuantity(aTask); long dbits = Double.doubleToLongBits(dQuantity); long rbits = Double.doubleToRawLongBits(dQuantity); errorString += ("quantity_d: " + Long.toHexString(dbits)); errorString += ("quantity_r: " + Long.toHexString(rbits)); logger.error(errorString,re); } else { throw re; }
  protected void logTask(Task aTask, boolean expandTimestamp, boolean isCountedTask) {    if (aTask == null) {      return;    }    String taskStr = buildTaskPrefixString(aTask);    long startTime = -1;    if (TaskUtils.getPreferenceBest(aTask, AspectType.START_TIME) == null) {      taskStr += ",";    } else {      startTime = TaskUtils.getStartTime(aTask);      if (isCountedTask &&          (TaskUtils.isProjection(aTask))) {        startTime = logInvPG.getEffectiveProjectionStart(aTask, startTime);      }      taskStr = taskStr + getDateString(startTime, expandTimestamp) + ",";    }    taskStr = taskStr + getDateString(TaskUtils.getEndTime(aTask), expandTimestamp) + ",";//This is qty for supply, daily rate for projection    try {      taskStr = taskStr + taskUtils.getDailyQuantity(aTask);    } catch (ClassCastException e) {      logger.error("Formatter:Problem task and the print out is :\n" + taskUtils.taskDesc(aTask));      throw e;    } catch (RuntimeException re) {      if (re.getMessage().indexOf("Assertion botch:") > -1) {        String errorString = "Assertion Botch: start time: " + startTime;        errorString += (" end time: " + TaskUtils.getEndTime(aTask));        double d = taskUtils.getQuantity(aTask); // don't print me!!!        long dbits = Double.doubleToLongBits(d);        long rbits = Double.doubleToRawLongBits(d);        errorString += ("quantity_d: " + Long.toHexString(dbits));        errorString += ("quantity_r: " + Long.toHexString(rbits));        logger.error(errorString);      }      throw re;  // re-throw for now    }    writeln(taskStr);  }