Package railo.runtime.exp

Examples of railo.runtime.exp.ExpressionException


    throw new ExpressionException("can't compare Complex Object Type Query with a DateTime Object");
  }

  @Override
  public int compareTo(double d) throws PageException {
    throw new ExpressionException("can't compare Complex Object Type Query with a numeric value");
  }
View Full Code Here


    throw new ExpressionException("can't compare Complex Object Type Query with a numeric value");
  }

  @Override
  public int compareTo(String str) throws PageException {
    throw new ExpressionException("can't compare Complex Object Type Query with a String");
  }
View Full Code Here

     * @return Array Object
     * @throws ExpressionException
     */
    public static String listInsertAt(String list, int pos, String value, String delimiter, boolean ignoreEmpty) throws ExpressionException {
        if(pos<1)
            throw new ExpressionException("invalid string list index ["+(pos)+"]");
  
        char[] del = delimiter.toCharArray();
        char c;
        StringBuilder result=new StringBuilder();
        String end="";
        int len;
       
        // remove at start
        if(ignoreEmpty){
          outer:while(list.length()>0) {
              c=list.charAt(0);
              for(int i=0;i<del.length;i++) {
                  if(c==del[i]) {
                      list=list.substring(1);
                      result.append(c);
                      continue outer;
                  }
              }
              break;
          }
        }
       
        // remove at end
        if(ignoreEmpty){
          outer:while(list.length()>0) {
              c=list.charAt(list.length()-1);
              for(int i=0;i<del.length;i++) {
                  if(c==del[i]) {
                      len=list.length();
                      list=list.substring(0,len-1<0?0:len-1);
                      end=c+end;
                      continue outer;
                  }
          
              }
              break;
          }
        }
       
        len=list.length();
        int last=0;
       
        int count=0;
        outer:for(int i=0;i<len;i++) {
            c=list.charAt(i);
            for(int y=0;y<del.length;y++) {
                if(c==del[y]) {
                   
                  if(!ignoreEmpty || last<i) {
                    if(pos==++count){
                            result.append(value);
                            result.append(del[0]);
                        }
          }
                    result.append(list.substring(last,i));
                    result.append(c);
                    last=i+1;
                    continue outer;
                }
            }
        }
        count++;
        if(last<=len){
            if(pos==count) {
                result.append(value);
                result.append(del[0]);
            }
           
            result.append(list.substring(last));
        }
        if(pos>count) {
            throw new ExpressionException("invalid string list index ["+(pos)+"], indexes go from 1 to "+(count));
           
        }
       
        return result+end;
       
View Full Code Here

    else if("square".equals(gridType)) this.gridType = SQUARE;
    else if("hexagonal".equals(gridType)) this.gridType = HEXAGONAL;
    else if("octagonal".equals(gridType)) this.gridType = OCTAGONAL;
    else if("triangular".equals(gridType)) this.gridType = TRIANGULAR;
    else
      throw new ExpressionException("invalid value ["+gridType+"] for gridType, valid values are [random,square,hexagonal,octagonal,triangular]");
  }
View Full Code Here

    type=type.trim().toUpperCase();
    if("RECT_TO_POLAR".equals(type)) this.type = RECT_TO_POLAR;
    else if("POLAR_TO_RECT".equals(type)) this.type = POLAR_TO_RECT;
    else if("INVERT_IN_CIRCLE".equals(type)) this.type = INVERT_IN_CIRCLE;
    else
      throw new ExpressionException("inavlid type defintion ["+type+"], valid types are [RECT_TO_POLAR,POLAR_TO_RECT,INVERT_IN_CIRCLE]");
  }
View Full Code Here

    return null;
  }
 
  @Override
  public Object remove(Key key) throws PageException {
      throw new ExpressionException("Unsupported Context for Local Scope","Can't invoke key "+key+", Local Scope can only invoked inside a Function");
  }
View Full Code Here

  @Override
  public void clear() {
  }
  @Override
  public Object get(Collection.Key key) throws ExpressionException {
    throw new ExpressionException("Unsupported Context for Local Scope","Can't invoke key "+key.getString()+", Local Scope can only invoked inside a Function");
  }
View Full Code Here

    return defaultValue;
  }

  @Override
  public Object set(Key key, Object value) throws ExpressionException {
    throw new ExpressionException("Unsupported Context for Local Scope","Can't invoke key "+key.getString()+", Local Scope can only invoked inside a Function");
  }
View Full Code Here

    return null;
  }
 
  @Override
  public Iterator<Collection.Key> keyIterator() {
    throw new PageRuntimeException(new ExpressionException("Unsupported Context for Local Scope","Local Scope can only invoked inside a Function"));
  }
View Full Code Here

    throw new PageRuntimeException(new ExpressionException("Unsupported Context for Local Scope","Local Scope can only invoked inside a Function"));
  }
 
  @Override
  public Iterator<Entry<Key, Object>> entryIterator() {
    throw new PageRuntimeException(new ExpressionException("Unsupported Context for Local Scope","Local Scope can only invoked inside a Function"));
  }
View Full Code Here

TOP

Related Classes of railo.runtime.exp.ExpressionException

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.