If an exception occurs while dumping, write out what we have so far

This commit is contained in:
Ben Gruver
2013-04-26 21:18:16 -07:00
parent 8340ecf3d5
commit afc0a7d325

View File

@ -159,12 +159,14 @@ public class DexAnnotator extends AnnotatedBytes {
mapItems = ordering.immutableSortedCopy(mapItems);
for (MapItem mapItem: mapItems) {
SectionAnnotator annotator = annotators.get(mapItem.getType());
annotator.annotateSection(this);
try {
for (MapItem mapItem: mapItems) {
SectionAnnotator annotator = annotators.get(mapItem.getType());
annotator.annotateSection(this);
}
} finally {
dexFile.writeAnnotations(out, this);
}
dexFile.writeAnnotations(out, this);
}
@Nullable