Package org.objectweb.asm.commons

Examples of org.objectweb.asm.commons.GeneratorAdapter.throwException()


    int exception = mg.newLocal(Type.getType(IllegalAccessException.class));
    mg.storeLocal(exception);
    mg.loadLocal(exception);
    mg.invokeStatic(Type.getType(Throwables.class),
                    getMethod(RuntimeException.class, "propagate", Throwable.class));
    mg.throwException();
    mg.endMethod();

  }

  /**
 
View Full Code Here


    mg.invokeVirtual(Type.getType(Schema.class), getMethod(SchemaHash.class, "getSchemaHash"));
    mg.invokeVirtual(Type.getType(SchemaHash.class), getMethod(String.class, "toString"));
    mg.invokeVirtual(Type.getType(String.class), getMethod(boolean.class, "equals", Object.class));
    Label hashEquals = mg.newLabel();
    mg.ifZCmp(GeneratorAdapter.NE, hashEquals);
    mg.throwException(Type.getType(IllegalArgumentException.class), "Schema not match.");
    mg.mark(hashEquals);

    // this.schema = schema;
    mg.loadThis();
    mg.loadArg(0);
View Full Code Here

      adapter.invokeStatic(Types.BODY_CONTENT_UTIL, FLUSH_AND_POP);
   
      // throw Caster.toPageException(t);
      adapter.loadLocal(t);
      adapter.invokeStatic(Types.CASTER, TO_PAGE_EXCEPTION);
      adapter.throwException();
    tcf.visitCatchEnd(bc);
   
    adapter.loadArg(0);
    adapter.loadLocal(localBC);
    adapter.invokeStatic(Types.BODY_CONTENT_UTIL, CLEAR_AND_POP);
View Full Code Here

      adapter.loadLocal(lThrow);
      adapter.invokeStatic(Types.ABORT, TryCatchFinally.IS_ABORT);
      //adapter.instanceOf(Types.ABORT);
          adapter.ifZCmp(Opcodes.IFEQ, abortEnd);
          adapter.loadLocal(lThrow);
          adapter.throwException();
          adapter.visitLabel(abortEnd);


          // PageExceptionImpl old=pc.getCatch();
          int old=adapter.newLocal(Types.PAGE_EXCEPTION);
View Full Code Here

            adapter.push(false);
            adapter.invokeVirtual(Types.PAGE_CONTEXT, TagTry.SET_CATCH3);
             
       
        adapter.loadLocal(pe);
        adapter.throwException();
      }
      adapter.visitLabel(endAllIf);
     
        // PageExceptionImpl old=pc.setCatch(old);
            adapter.loadArg(0);
View Full Code Here

     
     
     
          adapter.ifZCmp(Opcodes.IFEQ, abortEnd);
            adapter.loadLocal(e);
            adapter.throwException();
          adapter.visitLabel(abortEnd);
       

          // PageExceptionImpl old=pc.getCatch();
          int old=adapter.newLocal(Types.PAGE_EXCEPTION);
View Full Code Here

            adapter.push(true);
            adapter.invokeVirtual(Types.PAGE_CONTEXT, SET_CATCH3);
       
        //throw pe;
        adapter.loadLocal(pe);
        adapter.throwException();
      }
      adapter.visitLabel(endAllIfs);
     
   
    // PageExceptionImpl old=pc.getCatch();
View Full Code Here

   */
  public void _writeOut(BytecodeContext bc) throws BytecodeException {
    GeneratorAdapter adapter = bc.getAdapter();
    adapter.push(railo.runtime.exp.Abort.SCOPE_PAGE);
    adapter.invokeStatic(ABORT, NEW_INSTANCE);
    adapter.throwException();
   
  }
}
View Full Code Here

    adapter.invokeVirtual(currType, DO_END_TAG);
    adapter.push(javax.servlet.jsp.tagext.Tag.SKIP_PAGE);
    adapter.visitJumpInsn(Opcodes.IF_ICMPNE, endDoEndTag);
      adapter.push(Abort.SCOPE_PAGE);
      adapter.invokeStatic(ABORT, NEW_INSTANCE);
      adapter.throwException();
    adapter.visitLabel(endDoEndTag);
   
   
    if(doReuse) {
      // } finally{pc.reuse(tag);}
View Full Code Here

        ga.newInstance(udt);
        ga.dup();
        ga.loadLocal(loc, thr);
        ga.invokeConstructor(udt, org.objectweb.asm.commons.Method
                .getMethod("void <init>(java.lang.Throwable)"));
        ga.throwException();

        ga.visitTryCatchBlock(before, after, handler, "java/lang/Throwable");

        ga.endMethod();
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.