Package org.dmd.util.exceptions

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


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


          // Go around for another attribute
        }
        else{
          // Don't know what the heck this is
          ResultException ex = new ResultException();
          ex.addError("Malformed array - value followed by unrecognized character: " + input.charAt(index.intValue()));
          throw(ex);
        }
      }
    }
  }
View Full Code Here

      }
    }
   
    if (index.intValue() == input.length()){
      ResultException ex = new ResultException();
      ex.addError("Ran out of characters while expecting to find: " + message);
      throw(ex);
    }
  }
 
  /**
 
View Full Code Here

    rc = input.substring(quote1+1,quote2);
   
    // If it's empty, pitch a fit
    if (rc.length() == 0){
      ResultException ex = new ResultException();
      ex.addError("Empty string while trying to parse " + message + " at index: " + index.intValue() + " in input string: " + input);
      throw(ex);
    }
   
    index.set(colon + 1);
   
View Full Code Here

    rc = input.substring(quote1+1,quote2);
   
    // If it's empty, pitch a fit
    if (rc.length() == 0){
      ResultException ex = new ResultException();
      ex.addError("Empty string while trying to parse " + message + " at index: " + index.intValue() + " in input string: " + input);
      throw(ex);
    }
   
    index.set(quote2 + 1);
   
View Full Code Here

   * @return
   */
  private int indexOf(String instr, String substr, int after, String message) throws ResultException {
    if (after >= instr.length()){
      ResultException ex = new ResultException();
      ex.addError("Ran out of input while trying to find: " + substr + "  at offset: " + after + "  in input string: " + instr );
      throw(ex);
    }
   
    int rc = instr.indexOf(substr,after);
   
View Full Code Here

   
    int rc = instr.indexOf(substr,after);
   
    if (rc == -1){
      ResultException ex = new ResultException();
      ex.addError(message + instr);
      throw(ex);
    }
   
    return(rc);
  }
View Full Code Here

        }
      }
    }
    else{
      ResultException ex = new ResultException();
      ex.addError("Specified source directory doesn't exist: " + dir.getCanonicalPath());
      throw(ex);
    }
  }
 
  /**
 
View Full Code Here

      while(refs.hasNext()){
        String ref = refs.next();
        ConfigVersion cv = finder.getConfig(ref);
        if (cv == null){
          ResultException ex = new ResultException();
          ex.addError("MVW config not found: " + ref);
          ex.setLocationInfo(currentModule.getFile(), currentModule.getLineNumber());
          throw(ex);
        }
       
//        DebugInfo.debug("parseConfigInternal()\n\n" + cv.getLatestVersion().toString());
View Full Code Here

      ex.setLocationInfo(infile, lineNumber);
      throw(ex);
    }
    catch(DmcValueException e){
      ResultException ex = new ResultException();
      ex.addError(e.getMessage());
      if (e.getAttributeName() != null)
        ex.result.lastResult().moreMessages("Attribute: " + e.getAttributeName());
      ex.setLocationInfo(infile, lineNumber);
      throw(ex);
    }
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.