OSDN Git Service

Provide debugging info should extended opcode lookup fail.
authorJesse Wilson <jessewilson@google.com>
Wed, 19 Oct 2011 15:02:51 +0000 (11:02 -0400)
committerJesse Wilson <jessewilson@google.com>
Wed, 19 Oct 2011 15:05:08 +0000 (11:05 -0400)
Bug: http://code.google.com/p/android/issues/detail?id=20814
Change-Id: Iedaf07721c29dd3d24827c3f7a953b7371c9735d

dx/src/com/android/dx/dex/code/OutputFinisher.java

index ff0d75c..19b5634 100644 (file)
@@ -29,6 +29,7 @@ import com.android.dx.rop.cst.CstType;
 import com.android.dx.rop.cst.CstString;
 import com.android.dx.rop.type.Type;
 
+import com.android.dx.util.DexException;
 import java.util.ArrayList;
 import java.util.BitSet;
 import java.util.HashSet;
@@ -522,7 +523,7 @@ public final class OutputFinisher {
     private Dop findExpandedOpcodeForInsn(DalvInsn insn) {
         Dop result = findOpcodeForInsn(insn.getLowRegVersion(), insn.getOpcode());
         if (result == null) {
-            throw new AssertionError();
+            throw new DexException("No expanded opcode for " + insn);
         }
         return result;
     }