Do not catch graphics exception too early (#413)

This commit is contained in:
Andrey Novikov
2017-09-27 13:54:05 +03:00
committed by Emux
parent 75c2841a13
commit 4a848cc08c
8 changed files with 36 additions and 70 deletions

View File

@@ -59,23 +59,13 @@ public final class AndroidGraphics extends CanvasAdapter {
}
@Override
public Bitmap decodeSvgBitmapImpl(InputStream inputStream, int width, int height, int percent) {
try {
return new AndroidSvgBitmap(inputStream, width, height, percent);
} catch (IOException e) {
e.printStackTrace();
return null;
}
public Bitmap decodeSvgBitmapImpl(InputStream inputStream, int width, int height, int percent) throws IOException {
return new AndroidSvgBitmap(inputStream, width, height, percent);
}
@Override
public Bitmap loadBitmapAssetImpl(String relativePathPrefix, String src, int width, int height, int percent) {
try {
return createBitmap(relativePathPrefix, src, width, height, percent);
} catch (IOException e) {
e.printStackTrace();
}
return null;
public Bitmap loadBitmapAssetImpl(String relativePathPrefix, String src, int width, int height, int percent) throws IOException {
return createBitmap(relativePathPrefix, src, width, height, percent);
}
@Override