Package org.dmd.util.exceptions

Examples of org.dmd.util.exceptions.ResultException.addError()


    // Write the attribute access functions
    for (String attrname : atlist) {
      DmcUncheckedObject attrdef = attributeDefs.get(attrname);
      if (attrdef == null) {
        ResultException ex = new ResultException();
        ex.addError("Unknown attribute: " + attrname);
        throw (ex);
      }
      if (isEnumAttribute(attrdef)) {
        rc = true;
        break;
View Full Code Here


        @SuppressWarnings("unused")
        Class<?>  ruleClass = Class.forName(rd.getRuleDefinitionImport());
      } catch (ClassNotFoundException e) {
        if (ex == null)
          ex = new ResultException();
        ex.addError("You must create a rule implementation class: " + rd.getRuleDefinitionImport());
        ex.result.lastResult().moreMessages("It must extend " + genpackage + "." + rd.getName() + "BaseImpl");
      }
    }
   
    if (ex != null)
View Full Code Here

        }
        else
         
          if (cd.getJavaClass() == null){
            ResultException ex = new ResultException();
            ex.addError("The " + cd.getName() + " class must define the javaClass attribute to facilitate wrapper creation.");
            ex.result.lastResult().fileName(cd.getFile());
            ex.result.lastResult().lineNumber(cd.getLineNumber());
            throw(ex);
          }
         
View Full Code Here

        ClassDefinition cd = cdefs.next();
        cd.adjustJavaClass();
       
        if (cd.getDMWPackage() == null){
          ResultException ex = new ResultException();
          ex.addError("The " + cd.getDefinedIn().getName() + " schema must define the dmwPackage attribute to facilitate wrapper creation.");
          ex.result.lastResult().fileName(cd.getDefinedIn().getFile());
          throw(ex);
        }
       
        if (cd.getClassType() == ClassTypeEnum.AUXILIARY){
View Full Code Here

        }
        else
         
          if (cd.getJavaClass() == null){
            ResultException ex = new ResultException();
            ex.addError("The " + cd.getName() + " class must define the javaClass attribute to facilitate wrapper creation.");
            ex.result.lastResult().fileName(cd.getFile());
            ex.result.lastResult().lineNumber(cd.getLineNumber());
            throw(ex);
          }
         
View Full Code Here

                                // Trim the attribute name and leading spaces
                                attrVal.delete(0,attrName.length());
                                if (attrVal.length() == 0){
                                // We have a missing token value
                                ResultException ex = new ResultException();
                                ex.addError("No value for attribute: " + attrName);
                                ex.setLocationInfo(fileName, in.getLineNumber());
                                throw(ex);
                                }
                                while(attrVal.charAt(0) == ' '){
                                    attrVal.delete(0,1);
View Full Code Here

          wantEndCurly = true;
        }
        else{
          // ERROR Expecting {
          ResultException ex = new ResultException();
          ex.addError("Expecting opening bracket for object.");
          throw(ex);
        }
      }
      else if (wantEndCurly){
        eatWhiteSpace(input, index, "end bracket for object");
View Full Code Here

          // we trimmed the string at the beginning of the process, we know that there's not
          // just whitespace there.
          if ( (input.length()-1) != index.intValue()){
            // ERROR extraneous stuff
            ResultException ex = new ResultException();
            ex.addError("Extraneous characters after object.");
            throw(ex);
          }
         
          // Set this so that we know we were terminated properly
          wantEndCurly = false;
View Full Code Here

          wantEndCurly = false;
        }
        else{
          // ERROR Expecting }
          ResultException ex = new ResultException();
          ex.addError("Expecting closing bracket for object.");
          throw(ex);
        }
      }
    }
   
View Full Code Here

//    }
   
    if (wantEndCurly){
      // ERROR: We're missing the end curly brace
      ResultException ex = new ResultException();
      ex.addError("Closing bracket missing.");
      throw(ex);
    }
   
    return(basic);
   
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.