Examples of ResultException


Examples of org.dmd.util.exceptions.ResultException

      // Again, some trickiness, we have to resolve the rule so that we can access and use the must/may
      // attributes that are defined for it and add them to the class definition we create
        try {
      rd.resolveReferences(this);
    } catch (DmcValueExceptionSet e) {     
      ResultException ex = new ResultException();
      ex.addError("Unresolved references in RuleDefinition: " + rd.getName());
     
      for(DmcValueException dve : e.getExceptions()){
        ex.moreMessages(dve.getMessage());
      }
      throw(ex);
    }
     
      StringName ruleClassName = new StringName(rd.getName().getNameString() + "Data");
     
        if (checkAndAdd(rd.getObjectName(),rd,ruleDefs) == false){
          ResultException ex = new ResultException();
          ex.addError(clashMsg(rd.getObjectName(),rd,ruleDefs,"rule definitions"));
          throw(ex);
        }
        if (checkAndAdd(rd.getObjectName(),rd,allDefs) == false){
          ResultException ex = new ResultException();
          ex.addError(clashMsg(rd.getObjectName(),rd,allDefs,"definition names"));
            throw(ex);
        }
       
        if (performIDChecks){
          // Bump up the DMD ID by the amount of schemaBaseID
          int base = rd.getDefinedIn().getSchemaBaseID();
          int range = rd.getDefinedIn().getSchemaIDRange();
          int current = rd.getDmdID();
         
          if (current >= range){
            ResultException ex = new ResultException("Number of rules exceeds schema ID range: " + rd.getName());
            throw(ex);         
          }
         
          rd.setDmdID(base + current);
        }
       
        ClassDefinition existing = classDefs.get(ruleClassName);
        if (existing != null){
          // We have the class for this rule, just check that it's auto generated
          if (existing.getInternallyGenerated()){
            return;
          }
          else{
            // We have some kind of clash
          }
        }
       
        // We check that the ID of the rule doesn't clash with the class definitions, since we're
        // going to create a class for this rule with the rule's ID.
        if (classesByID.get(rd.getDmdID()) != null){
          ResultException ex = new ResultException();
          ex.addError(clashMsg(rd.getDmdID(),rd,classesByID,"dmdID"));
          throw(ex);
        }
       
        ///////////////////////////////////////////////////////////////////////
       
View Full Code Here

Examples of org.springsource.loaded.test.infra.ResultException

      System.out.println("Collected output running: " + methodname);
      System.out.println(oso.toString());
      System.out.println(ose.toString());
    }
    if (exception != null) {
      throw new ResultException(exception, oso.toString().replace("\r", ""), ose.toString().replace("\r", ""));
    } else {
      return new Result(result, oso.toString().replace("\r", ""), ose.toString().replace("\r", ""));
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.