Package railo.runtime.exp

Examples of railo.runtime.exp.CasterException


    return sct.get(KeyImpl.init(Caster.toString(key)));
  }

  @Override
  public boolean insert(int key, Object value) throws PageException {
    throw new CasterException(sct,"Array");
  }
View Full Code Here


    throw new CasterException(sct,"Array");
  }

  @Override
  public int[] intKeys() {
    throw new PageRuntimeException(new CasterException(sct,"Array"));
  }
View Full Code Here

    throw new PageRuntimeException(new CasterException(sct,"Array"));
  }

  @Override
  public Object prepend(Object o) throws PageException {
    throw new CasterException(sct,"Array");
  }
View Full Code Here

    @Override
    public Color toColor(Object o) throws PageException {
      if(o instanceof Color) return (Color) o;
      else if (o instanceof String)ColorCaster.toColor((String)o);
      else if (o instanceof Number)ColorCaster.toColor(Integer.toHexString(((Number)o).intValue()));
      throw new CasterException(o,Color.class);
    }
View Full Code Here

          else if(attr.isRequired())
            throw new ApplicationException("attribute ["+key.getString()+"] is required for tag ["+tagName+"]");
        }
        if(value!=null) {
          if(!Decision.isCastableTo(attr.getType(),value,true,true,-1))
            throw new CasterException(createMessage(attr.getType(), value));
       
        }
      }
     
      // check if there are attributes not supported
View Full Code Here

      else {
        if(!Decision.isCastableTo(type,value,true,true,maxLength)) {
          if(maxLength>-1 && ("email".equalsIgnoreCase(type) || "url".equalsIgnoreCase(type) || "string".equalsIgnoreCase(type))) {
            StringBuilder msg=new StringBuilder(CasterException.createMessage(value, type));
            msg.append(" with a maximum length of "+maxLength+" characters");
            throw new CasterException(msg.toString())
          }
          throw new CasterException(value,type)
        }
       
        setVariable(name,value);
        //REALCAST setVariable(name,Caster.castTo(this,type,value,true));
      }
View Full Code Here

    @Override
    public Query getQuery(String key) throws PageException {
    Object value=VariableInterpreter.getVariable(this,key);
    if(Decision.isQuery(value)) return Caster.toQuery(value);
      throw new CasterException(value,Query.class);///("["+key+"] is not a query object, object is from type ");
  }
View Full Code Here

    @Override
    public Query getQuery(Object value) throws PageException {
      if(Decision.isQuery(value)) return Caster.toQuery(value);
      value=VariableInterpreter.getVariable(this,Caster.toString(value));
      if(Decision.isQuery(value)) return Caster.toQuery(value);
      throw new CasterException(value,Query.class);
  }
View Full Code Here

        return new ApplicationException(message,detail);
    }
   
    @Override
    public PageException createCasterException(String message) {
        return new CasterException(message);
    }
View Full Code Here

    }
    if(value instanceof String) {
      if(password!=null)return new PdfReader(IOUtil.toBytes(Caster.toResource(pc,value,true)),password.getBytes());
      return new PdfReader(IOUtil.toBytes((Resource)value));
    }
    throw new CasterException(value,PdfReader.class);
  }
View Full Code Here

TOP

Related Classes of railo.runtime.exp.CasterException

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.