Package railo.runtime.exp

Examples of railo.runtime.exp.FunctionException


  public static String call(PageContext pc , String string, String regExp, String replace) throws ExpressionException {
        try {
            return Perl5Util.replace(string,regExp,replace,false,false);
        }
        catch (MalformedPatternException e) {
            throw new FunctionException(pc,"reReplaceNoCase",2,"regularExpression",e.getMessage());
        }
  }
View Full Code Here


    try {
      if(scope.equalsIgnoreCase("all"))return Perl5Util.replace(string,regExp,replace,false,true);
      return Perl5Util.replace(string,regExp,replace,false,false);
    }
    catch (MalformedPatternException e) {
      throw new FunctionException(pc,"reReplaceNoCase",2,"regularExpression",e.getMessage());
    }
  }
View Full Code Here

    try {
      if(returnsubexpressions)
        return Perl5Util.find(regExpr,str,(int)start,true);
      return new Double(Perl5Util.indexOf(regExpr,str,(int)start,true));
    } catch (MalformedPatternException e) {
      throw new FunctionException(pc,"reFind",1,"regularExpression",e.getMessage());
    }
  }
View Full Code Here

      setDimensions(dim[0],dim[1]);
    }

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [Amount, Stretch, Angle, Operation, Octaves, H, Lacunarity, Gain, Bias, T, FOV, CloudCover, CloudSharpness, Glow, GlowFalloff, Haziness, SunElevation, SunAzimuth, SunColor, CameraElevation, CameraAzimuth, WindSpeed, Time, Scale, Dimensions]");
    }

    return filter(src, dst);
  }
View Full Code Here

   
    int dayOfWeek=(int)dow;
    if(dayOfWeek>=1 && dayOfWeek<=7) {
        return DateFormatPool.format(locale,TimeZoneConstants.GMT0,_long?"EEEE":"EEE",dates[dayOfWeek-1]);
    }
    throw new FunctionException(
        pc,
        _long?"DayOfWeekAsString":"DayOfWeekShortAsString",
        1,"dayOfWeek",
        "must be between 1 and 7 now ["+dayOfWeek+"]");
    //throw new ExpressionException("invalid dayOfWeek definition in function DayOfWeekAsString, must be between 1 and 7 now ["+dayOfWeek+"]");
View Full Code Here

    if((o=parameters.removeEL(KeyImpl.init("Rotation")))!=null)setRotation(ImageFilterUtil.toFloatValue(o,"Rotation"));
    if((o=parameters.removeEL(KeyImpl.init("Zoom")))!=null)setZoom(ImageFilterUtil.toFloatValue(o,"Zoom"));

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [Colormap, Strength, Opacity, RaysOnly, Threshold, Angle, CentreX, CentreY, Centre, Distance, Rotation, Zoom]");
    }

    return filter(src, dst);
  }
View Full Code Here

  public static Array call(PageContext pc , String regExpr, String str) throws ExpressionException {
    try {
      return Perl5Util.match(regExpr, str, 1, false);
    }
    catch (MalformedPatternException e) {
      throw new FunctionException(pc,"REMatchNoCase",1,"regularExpression",e.getMessage());
    }
  }
View Full Code Here

    if((o=parameters.removeEL(KeyImpl.init("EdgeAction")))!=null)setEdgeAction(ImageFilterUtil.toString(o,"EdgeAction"));
    if((o=parameters.removeEL(KeyImpl.init("Interpolation")))!=null)setInterpolation(ImageFilterUtil.toString(o,"Interpolation"));

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [Amount, Turbulence, Stretch, Angle, Time, Scale, EdgeAction, Interpolation]");
    }

    return filter(src, dst);
  }
View Full Code Here

    if((o=parameters.removeEL(KeyImpl.init("UseAlpha")))!=null)setUseAlpha(ImageFilterUtil.toBooleanValue(o,"UseAlpha"));
    if((o=parameters.removeEL(KeyImpl.init("PremultiplyAlpha")))!=null)setPremultiplyAlpha(ImageFilterUtil.toBooleanValue(o,"PremultiplyAlpha"));

    // check for arguments not supported
    if(parameters.size()>0) {
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "the parameter"+(parameters.size()>1?"s":"")+" ["+CollectionUtil.getKeyList(parameters,", ")+"] "+(parameters.size()>1?"are":"is")+" not allowed, only the following parameters are supported [Kernel, EdgeAction, UseAlpha, PremultiplyAlpha]");
    }

    return filter(src, dst);
  }
View Full Code Here

  public static Struct call(PageContext pc , Query src, double dpage,double dpageSize) throws PageException {
    int page=(int) dpage;
    int pageSize=(int) dpageSize;
    if(page<1) {
      throw new FunctionException(pc,"QueryConvertForGrid",2,"page","page must be a positive number now ("+page+")");
    }
   
    int start = ((page-1)*pageSize)+1;
    int end = start+pageSize;
   
View Full Code Here

TOP

Related Classes of railo.runtime.exp.FunctionException

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.