From 61abe5b948a6ecf142c57dd5a70da38d7bdb1acc Mon Sep 17 00:00:00 2001 From: tonymanou Date: Tue, 17 Jan 2017 22:45:15 +0100 Subject: [PATCH] Do not close the whole application in case of error --- app/src/main/java/com/topjohnwu/magisk/utils/ZipUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/ZipUtils.java b/app/src/main/java/com/topjohnwu/magisk/utils/ZipUtils.java index 3164105a2..6b4fa363f 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/ZipUtils.java +++ b/app/src/main/java/com/topjohnwu/magisk/utils/ZipUtils.java @@ -172,8 +172,7 @@ public class ZipUtils { inputJar = new JarMap(new JarInputStream(inputStream)); if (signWholeFile) { if (!"RSA".equalsIgnoreCase(privateKey.getAlgorithm())) { - System.err.println("Cannot sign OTA packages with non-RSA keys"); - System.exit(1); + throw new IOException("Cannot sign OTA packages with non-RSA keys"); } signWholeFile(inputJar, context.getAssets().open(PUBLIC_KEY_NAME), publicKey, privateKey, outputStream);