mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-03 15:24:26 +02: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.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
|
* @author Ryszard Wiśniewski <brut.alll@gmail.com>
|
||||||
@ -71,17 +73,20 @@ public class ResFileDecoder {
|
|||||||
in.close();
|
in.close();
|
||||||
out.close();
|
out.close();
|
||||||
} catch (AndrolibException ex) {
|
} catch (AndrolibException ex) {
|
||||||
throw new AndrolibException(String.format(
|
LOGGER.log(Level.SEVERE, String.format(
|
||||||
"Could not decode file \"%s\" to \"%s\"",
|
"Could not decode file \"%s\" to \"%s\"",
|
||||||
inFileName, outFileName), ex);
|
inFileName, outFileName), ex);
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new AndrolibException(String.format(
|
LOGGER.log(Level.SEVERE, String.format(
|
||||||
"Could not decode file \"%s\" to \"%s\"",
|
"Could not decode file \"%s\" to \"%s\"",
|
||||||
inFileName, outFileName), ex);
|
inFileName, outFileName), ex);
|
||||||
} catch (DirectoryException ex) {
|
} catch (DirectoryException ex) {
|
||||||
throw new AndrolibException(String.format(
|
LOGGER.log(Level.SEVERE, String.format(
|
||||||
"Could not decode file \"%s\" to \"%s\"",
|
"Could not decode file \"%s\" to \"%s\"",
|
||||||
inFileName, outFileName), ex);
|
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 brut.androlib.AndrolibException;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import org.xmlpull.v1.*;
|
import org.xmlpull.v1.*;
|
||||||
import org.xmlpull.v1.wrapper.*;
|
import org.xmlpull.v1.wrapper.*;
|
||||||
@ -51,15 +50,12 @@ public class XmlPullStreamDecoder implements ResStreamDecoder {
|
|||||||
in.close();
|
in.close();
|
||||||
out.close();
|
out.close();
|
||||||
} catch (XmlPullParserException ex) {
|
} catch (XmlPullParserException ex) {
|
||||||
LOGGER.log(Level.SEVERE, "Could not decode XML", ex);
|
throw new AndrolibException("Could not decode XML", ex);
|
||||||
} catch (IOException 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 XmlPullParser mParser;
|
||||||
private final XmlSerializer mSerial;
|
private final XmlSerializer mSerial;
|
||||||
|
|
||||||
private final static Logger LOGGER =
|
|
||||||
Logger.getLogger(XmlPullStreamDecoder.class.getName());
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user