mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-05 02:22:55 +01:00
ResFileDecoder: continue on exception.
This commit is contained in:
parent
620b71abd3
commit
e4ecd30a27
@ -23,6 +23,8 @@ import brut.directory.DirectoryException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
|
||||
@ -71,17 +73,20 @@ public class ResFileDecoder {
|
||||
in.close();
|
||||
out.close();
|
||||
} catch (AndrolibException ex) {
|
||||
throw new AndrolibException(String.format(
|
||||
LOGGER.log(Level.SEVERE, String.format(
|
||||
"Could not decode file \"%s\" to \"%s\"",
|
||||
inFileName, outFileName), ex);
|
||||
} catch (IOException ex) {
|
||||
throw new AndrolibException(String.format(
|
||||
LOGGER.log(Level.SEVERE, String.format(
|
||||
"Could not decode file \"%s\" to \"%s\"",
|
||||
inFileName, outFileName), ex);
|
||||
} catch (DirectoryException ex) {
|
||||
throw new AndrolibException(String.format(
|
||||
LOGGER.log(Level.SEVERE, String.format(
|
||||
"Could not decode file \"%s\" to \"%s\"",
|
||||
inFileName, outFileName), ex);
|
||||
}
|
||||
}
|
||||
|
||||
private final static Logger LOGGER =
|
||||
Logger.getLogger(ResFileDecoder.class.getName());
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ package brut.androlib.res.decoder;
|
||||
|
||||
import brut.androlib.AndrolibException;
|
||||
import java.io.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.xmlpull.v1.*;
|
||||
import org.xmlpull.v1.wrapper.*;
|
||||
@ -51,15 +50,12 @@ public class XmlPullStreamDecoder implements ResStreamDecoder {
|
||||
in.close();
|
||||
out.close();
|
||||
} catch (XmlPullParserException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Could not decode XML", ex);
|
||||
throw new AndrolibException("Could not decode XML", ex);
|
||||
} catch (IOException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Could not decode XML", ex);
|
||||
throw new AndrolibException("Could not decode XML", ex);
|
||||
}
|
||||
}
|
||||
|
||||
private final XmlPullParser mParser;
|
||||
private final XmlSerializer mSerial;
|
||||
|
||||
private final static Logger LOGGER =
|
||||
Logger.getLogger(XmlPullStreamDecoder.class.getName());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user