fix: throw specific errors during XMLPullParser error

This commit is contained in:
Connor Tumbleson 2019-01-09 17:10:56 -05:00
parent ac3518e098
commit 6bb73b509d

View File

@ -21,6 +21,8 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.logging.Logger;
import brut.androlib.err.AXmlDecodingException;
import brut.androlib.err.RawXmlEncounteredException;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.wrapper.XmlPullParserWrapper;
@ -142,9 +144,9 @@ public class XmlPullStreamDecoder implements ResStreamDecoder {
}
ser.flush();
} catch (XmlPullParserException ex) {
throw new AndrolibException("Could not decode XML", ex);
throw new AXmlDecodingException("Could not decode XML", ex);
} catch (IOException ex) {
throw new AndrolibException("Could not decode XML", ex);
throw new RawXmlEncounteredException("Could not decode XML", ex);
}
}