Package com.dtrules.infrastructure

Examples of com.dtrules.infrastructure.RulesException


     */
    public void setValue(DTState state, IRObject[]keys, IRObject value) throws RulesException{
        IRObject v = this;
        for(int i=0;i<keys.length-1; i++){
            if(v.type()!=iTable){
                throw new RulesException("OutOfBounds","RTable","Invalid Number of Keys used with Table "+this.stringValue());
            }
            RTable   table = v.rTableValue();
            IRObject next  =  table.getValue(keys[i]);
            if(next == null){
                next = newRTable(state.getSession().getEntityFactory(),this.tablename,this.description.stringValue(),this.resultType);
View Full Code Here


   
    public IRObject getValue(IRObject[]keys) throws RulesException {
        IRObject v = this;
        for(int i=0;i<keys.length; i++){
            if(v.type()!=iTable){
                throw new RulesException("OutOfBounds","RTable","Invalid Number of Keys used with Table "+this.stringValue());
            }
            RTable   table = v.rTableValue();
            IRObject next  =  table.getValue(keys[i]);
            if(next == null){
                return RNull.getRNull();
View Full Code Here

        }
        try {
            long v = Long.parseLong(s);
            return v;
        } catch (NumberFormatException e) {
            throw new RulesException("Conversion Error","RInteger.getIntegerValue()","Could not covert the string '"+s+"' to an integer: "+e.getMessage());
        }
    }
View Full Code Here

     * return the top element.  A stack underflow or overflow will
     * be thrown if the index is out of range.
     */
    public IRObject getds(int i) throws RulesException{
        if(i>=datastkptr){
            throw new RulesException(
                    "Data Stack Overflow",
                    "getds",
                    "index out of range: "+i);
        }
        if(i<0){
            throw new RulesException(
                    "Data Stack Underflow",
                    "getds",
                    "index out of range: "+i);
        }
        return datastk[i];
View Full Code Here

     * return the top entity.  A stack underflow or overflow will
     * be thrown if the index is out of range.
     */
    public IREntity getes(int i) throws RulesException{
        if(i>=entitystkptr){
            throw new RulesException(
                    "Entity Stack Overflow", "getes",
                    "index out of range: "+i);
        }
        if(i<0){
            throw new RulesException(
                    "Entity Stack Underflow", "getes",
                    "index out of range: "+i);
        }
        return entitystk[i];
    }
View Full Code Here

   * @param o
   * @throws RulesException
   */
  public void datapush(IRObject o) throws RulesException {
    if(datastkptr>=1000) {
      throw new RulesException(
                    "Data Stack Overflow",
                    o.stringValue(),
                    "Data Stack overflow.");
    }
    datastk[datastkptr++]=o;
View Full Code Here

   * @return
   * @throws RulesException
   */
  public IRObject datapop() throws RulesException {
    if(datastkptr<=0) {
      throw new RulesException( "Data Stack Underflow", "datapop()", "Data Stack underflow.");
    }
        IRObject rval = datastk[--datastkptr];
        datastk[datastkptr]=null;
        if(testState(VERBOSE)){
            traceInfo("datapop",rval.stringValue());
View Full Code Here

   * @param o
   * @throws RulesException
   */
  public void entitypush(IREntity o) throws RulesException {
    if(entitystkptr>=1000) {
      throw new RulesException("Entity Stack Overflow",
                    o.stringValue(),
                    "Entity Stack overflow.");
    }
    entitystk[entitystkptr++]=o;
  }
View Full Code Here

   * @return
   * @throws RulesException
   */
  public IREntity entitypop() throws RulesException {
    if(entitystkptr<=0) {
            throw new RulesException("Entity Stack Underflow",
                    "entitypop", "Entity Stack underflow.");
    }
        IREntity rval = entitystk[--entitystkptr];
        entitystk[entitystkptr] = null;
    return(rval);
View Full Code Here

   * @return
   * @throws RulesException
   */
  public IREntity entityfetch(int i) throws RulesException {
      if(entitystkptr<=i) {
            throw new RulesException("Entity Stack Underflow",
                    "entityfetch", "Entity Stack underflow.");
        }
        IREntity rval = entitystk[entitystkptr-1-i];
        return(rval);
  }
View Full Code Here

TOP

Related Classes of com.dtrules.infrastructure.RulesException

Copyright © 2018 www.massapicom. 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.