Exemplo n.º 1
0
 public static void endVisit(
     MethodVisitor mv, @Nullable String description, @Nullable PsiElement method) {
   try {
     mv.visitMaxs(-1, -1);
     mv.visitEnd();
   } catch (ProcessCanceledException e) {
     throw e;
   } catch (Throwable t) {
     String bytecode = renderByteCodeIfAvailable(mv);
     throw new CompilationException(
         "wrong code generated"
             + (description != null ? " for " + description : "")
             + t.getClass().getName()
             + " "
             + t.getMessage()
             + (bytecode != null ? "\nbytecode:\n" + bytecode : ""),
         t,
         method);
   }
 }