mirror of
https://github.com/revanced/smali.git
synced 2025-05-28 03:40:12 +02:00
Add additional error context for errors that occur while loading the boot class path files
git-svn-id: https://smali.googlecode.com/svn/trunk@668 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
6786055f35
commit
74eeca35f7
@ -115,7 +115,12 @@ public class ClassPath {
|
||||
bootClassPathEntry + "\".");
|
||||
}
|
||||
|
||||
loadDexFile(dexFile);
|
||||
try {
|
||||
loadDexFile(dexFile);
|
||||
} catch (Exception ex) {
|
||||
throw ExceptionWithContext.withContext(ex,
|
||||
String.format("Error while loading boot classpath entry %s", bootClassPathEntry));
|
||||
}
|
||||
return;
|
||||
}
|
||||
throw new ExceptionWithContext(String.format("Cannot locate boot class path file %s", bootClassPathEntry));
|
||||
@ -123,12 +128,17 @@ public class ClassPath {
|
||||
|
||||
private void loadDexFile(DexFile dexFile) {
|
||||
for (ClassDefItem classDefItem: dexFile.ClassDefsSection.getItems()) {
|
||||
//TODO: need to check if the class already exists. (and if so, what to do about it?)
|
||||
ClassDef classDef = new ClassDef(classDefItem);
|
||||
classDefs.put(classDef.getClassType(), classDef);
|
||||
try {
|
||||
//TODO: need to check if the class already exists. (and if so, what to do about it?)
|
||||
ClassDef classDef = new ClassDef(classDefItem);
|
||||
classDefs.put(classDef.getClassType(), classDef);
|
||||
|
||||
if (classDefItem.getClassType().getTypeDescriptor().equals("Ljava/lang/Object;")) {
|
||||
theClassPath.javaLangObjectClassDef = classDef;
|
||||
if (classDefItem.getClassType().getTypeDescriptor().equals("Ljava/lang/Object;")) {
|
||||
theClassPath.javaLangObjectClassDef = classDef;
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw ExceptionWithContext.withContext(ex, String.format("Error while loading class %s",
|
||||
classDefItem.getClassType().getTypeDescriptor()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user