Ejemplo n.º 1
0
  protected void tagLoadingComplete() throws cfmBadFileException {
    cfTag tagList[] = getTagList();
    for (int i = 0; i < tagList.length; i++) {
      cfTag tag = tagList[i];
      if (caseMap != null && tag instanceof cfCASE) {

        String[] values = ((cfCASE) tag).getValues();
        for (int j = 0; j < values.length; j++) {
          if (caseMap.containsKey(values[j])) {
            caseMap = null;
            cfCatchData catchData = new cfCatchData();
            catchData.setType(cfCatchData.TYPE_TEMPLATE);
            catchData.setTagname(tag.getTagName());
            catchData.setLine(tag.posLine);
            catchData.setColumn(tag.posColumn);
            catchData.setMessage("CFSWITCH has duplicate CFCASE values");
            catchData.setDetail("Duplicate CFCASE value: \"" + values[j] + "\"");
            throw new cfmBadFileException(catchData);
          }
          caseMap.put(values[j], tag);
        }

      } else {
        if (tag instanceof cfDEFAULTCASE) {
          defaultCase = (cfDEFAULTCASE) tag;
        }
      }
    }
  }
Ejemplo n.º 2
0
 protected cfmRunTimeException newRunTimeException(String ErrorMessage) {
   cfCatchData catchData = new cfCatchData();
   catchData.setDetail(toString());
   catchData.setMessage(ErrorMessage);
   catchData.setType("Database");
   return new cfmRunTimeException(catchData);
 }