/** * Throws an exception when an invalid state is hit in a tableswitch */ private static void stateNotFound(final CodeAttribute c, final TableSwitchBuilder builder) { c.branchEnd(builder.getDefaultBranchEnd().get()); c.newInstruction(RuntimeException.class); c.dup(); c.ldc("Invalid character"); c.invokespecial(RuntimeException.class.getName(), "<init>", "(Ljava/lang/String;)V"); c.athrow(); }
c.dup(); c.invokespecial(BAD_REQUEST_EXCEPTION, "<init>", "()V"); c.athrow();
void withinCatchBlock(CodeAttribute b, ClassMethod method) { final ExceptionHandler start = b.exceptionBlockStart(Throwable.class.getName()); doWork(b, method); // end the interceptor context, everything was fine endIfStarted(b, method); // jump over the catch block BranchEnd gotoEnd = b.gotoInstruction(); // create catch block b.exceptionBlockEnd(start); b.exceptionHandlerStart(start); // end the interceptor context if there was an exception endIfStarted(b, method); b.athrow(); // update the correct address to jump over the catch block b.branchEnd(gotoEnd); doReturn(b, method); }
void withinCatchBlock(CodeAttribute b, ClassMethod method) { final ExceptionHandler start = b.exceptionBlockStart(Throwable.class.getName()); doWork(b, method); // end the interceptor context, everything was fine endIfStarted(b, method); // jump over the catch block BranchEnd gotoEnd = b.gotoInstruction(); // create catch block b.exceptionBlockEnd(start); b.exceptionHandlerStart(start); // end the interceptor context if there was an exception endIfStarted(b, method); b.athrow(); // update the correct address to jump over the catch block b.branchEnd(gotoEnd); doReturn(b, method); }
void withinCatchBlock(CodeAttribute b, ClassMethod method) { final ExceptionHandler start = b.exceptionBlockStart(Throwable.class.getName()); doWork(b, method); // end the interceptor context, everything was fine endIfStarted(b, method); // jump over the catch block BranchEnd gotoEnd = b.gotoInstruction(); // create catch block b.exceptionBlockEnd(start); b.exceptionHandlerStart(start); // end the interceptor context if there was an exception endIfStarted(b, method); b.athrow(); // update the correct address to jump over the catch block b.branchEnd(gotoEnd); doReturn(b, method); }
void withinCatchBlock(CodeAttribute b, ClassMethod method) { final ExceptionHandler start = b.exceptionBlockStart(Throwable.class.getName()); doWork(b, method); // end the interceptor context, everything was fine endIfStarted(b, method); // jump over the catch block BranchEnd gotoEnd = b.gotoInstruction(); // create catch block b.exceptionBlockEnd(start); b.exceptionHandlerStart(start); // end the interceptor context if there was an exception endIfStarted(b, method); b.athrow(); // update the correct address to jump over the catch block b.branchEnd(gotoEnd); doReturn(b, method); }
void withinCatchBlock(CodeAttribute b, ClassMethod method) { final ExceptionHandler start = b.exceptionBlockStart(Throwable.class.getName()); doWork(b, method); // end the interceptor context, everything was fine endIfStarted(b, method); // jump over the catch block BranchEnd gotoEnd = b.gotoInstruction(); // create catch block b.exceptionBlockEnd(start); b.exceptionHandlerStart(start); // end the interceptor context if there was an exception endIfStarted(b, method); b.athrow(); // update the correct address to jump over the catch block b.branchEnd(gotoEnd); doReturn(b, method); }
void withinCatchBlock(CodeAttribute b, ClassMethod method) { final ExceptionHandler start = b.exceptionBlockStart(Throwable.class.getName()); doWork(b, method); // end the interceptor context, everything was fine endIfStarted(b, method); // jump over the catch block BranchEnd gotoEnd = b.gotoInstruction(); // create catch block b.exceptionBlockEnd(start); b.exceptionHandlerStart(start); // end the interceptor context if there was an exception endIfStarted(b, method); b.athrow(); // update the correct address to jump over the catch block b.branchEnd(gotoEnd); doReturn(b, method); }