Examples of BytecodeException


Examples of railo.transformer.bytecode.BytecodeException

        // TODO Array als Lbyte und auch byte[]
       
    try {
      return Type.getType(ClassUtil.loadClass(type));
    } catch (ClassException e) {
      throw new BytecodeException(e,null);
    }
  }
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

    // type
    if(type==null || type instanceof ExprString) ;
    else if(type instanceof Variable) {
      type=VariableString.toExprString(type);
    }
    else throw new BytecodeException("type from catch statement is invalid",type.getStart());
   
    // name
    if(name instanceof LitString){
      Variable v = new Variable(Scope.SCOPE_UNDEFINED,name.getStart(),name.getEnd());
      v.addMember(new DataMember(name));
      name=new VariableRef(v);
    }
    else if(name instanceof Variable) name=new VariableRef((Variable) name);
    else throw new BytecodeException("name from catch statement is invalid",name.getStart());
   
    addCatch((ExprString)type, (VariableRef)name, b, line);
 
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

    break;
   
   
   
    default:
      throw new BytecodeException("invalid type",getStart());
    }
  }
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

    }
   
    String strAccess = ((LitString)access).getString();
    int acc = ComponentUtil.toIntAccess(strAccess,-1);
    if(acc==-1)
      throw new BytecodeException("invalid access type ["+strAccess+"], access types are remote, public, package, private",getStart());
       
    Function func = new FunctionImpl(page,name, returnType,returnFormat, output, bufferOutput, acc, displayname,description,
        hint,secureJson,verifyClient,localMode,cachedWithin,_abstract,_final, body, getStart(),getEnd());
    
   
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

  }


  public static TagOutput getParentTagOutputQuery(Statement stat) throws BytecodeException {
    Statement parent=stat.getParent();
    if(parent==null) throw new BytecodeException("there is no parent output with query",null);
    else if(parent instanceof TagOutput) {
      if(((TagOutput)parent).hasQuery())
        return ((TagOutput)parent);
    }
    return getParentTagOutputQuery(parent);
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

      TagGroupUtil.writeOutTypeQuery(this,bc);
      bc.changeDoSubFunctions(old);
    break;
   
    default:
      throw new BytecodeException("invalid type",getStart());
    }
  }
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

    //adapter.pop();
  }
 
  public static TagGroup getParentTagGroupQuery(Statement st, short type) throws BytecodeException {
    Statement parent=st.getParent();
    if(parent==null) throw new BytecodeException("there is no parent output with query",null);
    else if(parent instanceof TagGroup && type==((TagGroup)parent).getType()) {
      if(((TagGroup)parent).hasQuery())
        return ((TagGroup)parent);
    }
    return getParentTagGroupQuery(parent,type);
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

  public final void addAttribute(Attribute attr) throws TemplateException {
    String name=attr.getName().toLowerCase();
    // name
    if("name".equals(name))  {
      throw new BytecodeException("name cannot be defined twice",getStart());
      //this.name=CastString.toExprString(attr.getValue());
    }
    else if("returntype".equals(name))  {
      this.returnType=toLitString(name,attr.getValue());
    }
    else if("access".equals(name))  {
     
      LitString ls = toLitString(name,attr.getValue());
      String strAccess = ls.getString();
      int acc = ComponentUtil.toIntAccess(strAccess,-1);
      if(acc==-1)
        throw new BytecodeException("invalid access type ["+strAccess+"], access types are remote, public, package, private",getStart());
      access=acc;
     
    }
   
    else if("output".equals(name))    this.output=toLitBoolean(name,attr.getValue());
    else if("bufferoutput".equals(name))this.bufferOutput=toLitBoolean(name,attr.getValue());
    else if("displayname".equals(name))  this.displayName=toLitString(name,attr.getValue());
    else if("hint".equals(name))    this.hint=toLitString(name,attr.getValue());
    else if("description".equals(name))  this.description=toLitString(name,attr.getValue());
    else if("returnformat".equals(name))this.returnFormat=toLitString(name,attr.getValue());
    else if("securejson".equals(name))  this.secureJson=toLitBoolean(name,attr.getValue());
    else if("verifyclient".equals(name))  this.verifyClient=toLitBoolean(name,attr.getValue());
    else if("localmode".equals(name))  {
      Expression v = attr.getValue();
      if(v!=null) {
        String str = ASMUtil.toString(v,null);
        if(!StringUtil.isEmpty(str)){
          int mode = AppListenerUtil.toLocalMode(str, -1);
          if(mode!=-1) this.localMode=LitInteger.toExpr(mode);
          else throw new BytecodeException("Attribute localMode of the Tag Function, must be a literal value (modern, classic, true or false)",getStart());
        }
      }
    }
    else if("cachedwithin".equals(name))  {
      try {
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

  }

  private final LitString toLitString(String name, Expression value) throws BytecodeException {
    ExprString es = CastString.toExprString(value);
    if(!(es instanceof LitString))
      throw new BytecodeException("value of attribute ["+name+"] must have a literal/constant value",getStart());
    return (LitString) es;
  }
View Full Code Here

Examples of railo.transformer.bytecode.BytecodeException

  }
 
  private final LitBoolean toLitBoolean(String name, Expression value) throws BytecodeException {
     ExprBoolean eb = CastBoolean.toExprBoolean(value);
    if(!(eb instanceof LitBoolean))
      throw new BytecodeException("value of attribute ["+name+"] must have a literal/constant value",getStart());
    return (LitBoolean) eb;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.