Package railo.runtime.exp

Examples of railo.runtime.exp.CasterException


     
    DateTime datetime = DateCaster.toDateAdvanced(object,tz,null);
      //Caster.toDate(object,true,tz,null);
    if(datetime==null) {
      if(StringUtil.isEmpty(object,true)) return "";
        throw new CasterException(object,"datetime");
        //if(!Decision.isSimpleValue(object))
        //    throw new ExpressionException("can't convert object of type "+Type.getName(object)+" to a datetime value");
        //throw new ExpressionException("can't convert value "+object+" to a datetime value");
    }
    return new railo.runtime.format.DateFormat(locale).format(datetime,mask,tz);
View Full Code Here


   * @deprecated replaced with toRawNode
   */
  public static Node toNode(Object o) throws PageException {
    if(o instanceof XMLStruct)return ((XMLStruct)o).toNode();
    if(o instanceof Node)return (Node)o;
    throw new CasterException(o,"node");
  }
View Full Code Here

        }
        else if(o instanceof Enumeration) {
            return new EnumAsIt((Enumeration)o);
        }
   
        throw new CasterException(o,"collection");
  }
View Full Code Here

  }

  public static Collection.Key toKey(Object obj) throws CasterException {
    if(obj instanceof Collection.Key) return (Collection.Key) obj;
    String str = Caster.toString(obj,null);
    if(str==null) throw new CasterException(obj,Collection.Key.class);
    return init(str);
  }
View Full Code Here

  }

  public static Image toImage(Object obj) throws PageException {
    if(obj instanceof Image) return (Image) obj;
    if(obj instanceof ObjectWrap) return toImage(((ObjectWrap)obj).getEmbededObject());
    throw new CasterException(obj,"Image");
  }
View Full Code Here

      if(obj instanceof java.awt.Imagereturn new Image(toBufferedImage((java.awt.Image) obj));
     
    } catch (Throwable t) {
      throw Caster.toPageException(t);
    }
    throw new CasterException(obj,"Image");
  }
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.