mirror of
https://github.com/revanced/smali.git
synced 2025-05-05 00:54:25 +02:00
Add additional context information to exceptions when building a MethodDefinition object
git-svn-id: https://smali.googlecode.com/svn/trunk@672 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
cbc21d5ece
commit
10a9518111
@ -42,6 +42,7 @@ import org.jf.dexlib.Debug.DebugInstructionIterator;
|
||||
import org.jf.dexlib.Util.AccessFlags;
|
||||
import org.antlr.stringtemplate.StringTemplateGroup;
|
||||
import org.antlr.stringtemplate.StringTemplate;
|
||||
import org.jf.dexlib.Util.ExceptionWithContext;
|
||||
import org.jf.dexlib.Util.Hex;
|
||||
import org.jf.dexlib.Util.SparseIntArray;
|
||||
|
||||
@ -61,6 +62,9 @@ public class MethodDefinition {
|
||||
private final int registerCount;
|
||||
|
||||
public MethodDefinition(StringTemplateGroup stg, ClassDataItem.EncodedMethod encodedMethod) {
|
||||
|
||||
|
||||
try {
|
||||
this.stg = stg;
|
||||
this.encodedMethod = encodedMethod;
|
||||
|
||||
@ -98,6 +102,10 @@ public class MethodDefinition {
|
||||
methodAnalyzer = null;
|
||||
registerCount = 0;
|
||||
}
|
||||
}catch (Exception ex) {
|
||||
throw ExceptionWithContext.withContext(ex, String.format("Error while processing method %s",
|
||||
encodedMethod.method.getMethodString()));
|
||||
}
|
||||
}
|
||||
|
||||
public StringTemplate createTemplate(AnnotationSetItem annotationSet,
|
||||
|
Loading…
x
Reference in New Issue
Block a user