Package railo.runtime.exp

Examples of railo.runtime.exp.ApplicationException


    else if("fatalinfo".equals(strType))       type=Log.LEVEL_FATAL;
    else if("fatal".equals(strType))         type=Log.LEVEL_FATAL;
    else if("debug".equals(strType))         type=Log.LEVEL_DEBUG;
    else if("debugging".equals(strType))       type=Log.LEVEL_DEBUG;
    else if("debuging".equals(strType))       type=Log.LEVEL_DEBUG;
    else throw new ApplicationException("invalid value ["+strType+"] for attribute [type], valid values are [Debug, Information, Warning, Error, Fatal Information]");
  }
View Full Code Here


    // get response object
    HttpServletResponse rsp = pageContext. getHttpServletResponse();
     
        // check committed
        if(rsp.isCommitted())
            throw new ApplicationException("content is already flushed","you can't rewrite head of response after part of the page is flushed");
       
        // set type
        if(!StringUtil.isEmpty(type,true)) {
          type=type.trim();
          rsp.setContentType(type);
View Full Code Here

        align=align.trim().toLowerCase();
        if(ListUtil.listFind("top,left,bottom,baseline,texttop,absbottom,middle,absmiddle,right",align,",")>-1) {
            params.setEL("align",align);
        }
        else
            throw new ApplicationException("attribute align ["+align+"] is invalid","valid alignments are [top,left,bottom,baseline,texttop,absbottom,middle,absmiddle,right]");
    }
View Full Code Here

    public void setLookandfeel(String lookandfeel) throws ApplicationException {
        lookandfeel=lookandfeel.trim().toLowerCase();
        if(lookandfeel.equals("motif"))params.setEL("lookandfeel",lookandfeel);
        else if(lookandfeel.equals("windows"))params.setEL("lookandfeel",lookandfeel);
        else if(lookandfeel.equals("metal"))params.setEL("lookandfeel",lookandfeel);
        else throw new ApplicationException("value of attribute lookAndFeel ["+lookandfeel+"] is invalid","valid values are [motif,windows,metal]");
       
    }
View Full Code Here

       
        Array arr=ListUtil.listToArray(range,',');
       
        if(arr.size()==1) {
            double from=Caster.toDoubleValue(arr.get(1,null),Double.NaN);
            if(!Decision.isValid(from))throw new ApplicationException(errMessage,errDetail);
            input.setRangeMin(from);
            input.setRangeMax(Double.NaN);
            if(from<100)params.setEL("minimum",Caster.toString(from));
        }
        else if(arr.size()==2) {
            String strFrom=arr.get(1,"").toString().trim();
            double from=Caster.toDoubleValue(strFrom,Double.NaN);
            if(!Decision.isValid(from) && strFrom.length()>0) {
                throw new ApplicationException(errMessage,errDetail);
            }
            input.setRangeMin(from);
           
            String strTo=arr.get(2,"").toString().trim();
            double to=Caster.toDoubleValue(strTo,Double.NaN);
            if(!Decision.isValid(to) && strTo.length()>0) {
                throw new ApplicationException(errMessage,errDetail);
            }
            input.setRangeMax(to);
           
            if(from<to) {
                params.setEL("minimum",Caster.toString(from));
                params.setEL("maximum",Caster.toString(to));
            }
           
        }
        else throw new ApplicationException(errMessage,errDetail);
    }
View Full Code Here

        while(parent!=null && !(parent instanceof Form)){
      parent=parent.getParent();
    }
   
    if(!(parent instanceof Form)) {
      throw new ApplicationException("Tag slider must be inside a form tag");
    }
    Form form = (Form)parent;
      form.setInput(input);
      String codebase;
       
View Full Code Here

    else if("rotate".equals(strAction))action=ACTION_ROTATE;
    else if("write".equals(strAction))action=ACTION_WRITE;
    else if("writetobrowser".equals(strAction))action=ACTION_WRITE_TO_BROWSER;
    else if("write-to-browser".equals(strAction))action=ACTION_WRITE_TO_BROWSER;
    else if("write_to_browser".equals(strAction))action=ACTION_WRITE_TO_BROWSER;
    else throw new ApplicationException("invalid action ["+this.strAction+"], " +
    "valid actions are [border,captcha,convert,info,read,resize,rotate,write,writeToBrowser]");
  }
View Full Code Here

    strDifficulty=strDifficulty.trim().toLowerCase();
    if(StringUtil.isEmpty(strDifficulty))  difficulty=MarpleCaptcha.DIFFICULTY_LOW;
    else if("low".equals(strDifficulty))  difficulty=MarpleCaptcha.DIFFICULTY_LOW;
    else if("medium".equals(strDifficulty))  difficulty=MarpleCaptcha.DIFFICULTY_MEDIUM;
    else if("high".equals(strDifficulty))  difficulty=MarpleCaptcha.DIFFICULTY_HIGH;
    else throw new ApplicationException("invalid difficulty level ["+strDifficulty+"], " +
    "valid difficulty level are [low,medium,high]");
   
  }
View Full Code Here

    else if("jpe".equalsIgnoreCase(format))  this.format =  "jpg";
    else if("jpeg".equalsIgnoreCase(format))this.format =  "jpg";
    else if("png".equalsIgnoreCase(format))  this.format =  "png";
    else if("tiff".equalsIgnoreCase(format))this.format =  "tiff";
    else if("bmp".equalsIgnoreCase(format))  this.format =  "bmp";
    else throw new ApplicationException("invalid format ["+format+"], " +
    "valid formats are [gif,jpg,png,tiff,bmp]");
  }
View Full Code Here

   * @throws ApplicationException
   */
  public void setQuality(double quality) throws ApplicationException {
    this.quality = (float) quality;
    if(quality<0 || quality>1)
      throw new ApplicationException("quality ("+Caster.toString(quality)+") has to be a value between 0 and 1");
  }
View Full Code Here

TOP

Related Classes of railo.runtime.exp.ApplicationException

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.