Improve the error message for a truncated last instruction

This commit is contained in:
Ben Gruver 2016-10-23 22:10:11 -07:00
parent 8e1afdda32
commit a0ccd94bf9

View File

@ -84,7 +84,7 @@ public class DexBackedMethodImplementation implements MethodImplementation {
// Does the instruction extend past the end of the method? // Does the instruction extend past the end of the method?
int offset = reader.getOffset(); int offset = reader.getOffset();
if (offset > endOffset || offset < 0) { if (offset > endOffset || offset < 0) {
throw new ExceptionWithContext("The last instruction in the method is truncated"); throw new ExceptionWithContext("The last instruction in method %s is truncated", method);
} }
return instruction; return instruction;
} }