Package com.dtrules.infrastructure

Examples of com.dtrules.infrastructure.RulesException


           
            for(IRObject o : array){
                 int      t = o.type();
                 if(t== iNull)continue;
                 if(t!=iEntity){
                     throw new RulesException("Type Check", "Forallr", "Encountered a non-Entity entry in array: "+o);
                
                 state.entitypush((IREntity) o);
                 body.execute(state);
                 state.entitypop();
            }
View Full Code Here


     * elements on the data stack, getds(2) will 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

     * entities on the entity stack, getes(2) will 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;
        if (testState(VERBOSE)) {
            traceInfo("datapush", "attribs", o.postFix(), null);
        }
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.");
        }
        if((state & TRACE) > 0){
          traceInfo("entitypush","entity",o.getName().stringValue(), "id",o.getID()+"",null);
        }
        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.");
        }
        if((state & TRACE) > 0){
          traceInfo("entitypop",null);
        }
        IREntity rval = entitystk[--entitystkptr];
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

     *
     * @throws RulesException
     */
    public void pushframe() throws RulesException {
        if (framestkptr >= stklimit) {
            throw new RulesException("Control Stack Overflow", "pushframe", "Control Stack Overflow.");

        }
        frames[framestkptr++] = currentframe;
        currentframe = ctrlstkptr;
    }
View Full Code Here

     *
     * @throws RulesException
     */
    public void popframe() throws RulesException {
        if (framestkptr <= 0) {
            throw new RulesException("Control Stack Underflow", "popframe", "Control Stack underflow.");
        }
        ctrlstkptr = currentframe; // Pop off this frame,
        currentframe = frames[--framestkptr]; // Then set the currentframe back
                                              // to its previous value.
    }
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.