Better exception

This commit is contained in:
J-Jamet committed 2021-03-22 10:37:06 +01:00
1 parent 874fdb7da0
commit de3dbe3b36
1 file changed
+2 -8
@@ -70,14 +70,8 @@ class DatabaseOutputKDB(private val mDatabaseKDB: DatabaseKDB,
.cipherEngine.getCipher(Cipher.ENCRYPT_MODE,
finalKey ?: ByteArray(0),
header.encryptionIV)
} catch (e1: NoSuchAlgorithmException) {
throw IOException("No such algorithm")
} catch (e1: NoSuchPaddingException) {
throw IOException("No such padding")
} catch (e1: InvalidKeyException) {
throw IOException("Invalid key")
} catch (e1: InvalidAlgorithmParameterException) {
throw IOException("Invalid algorithm parameter.")
} catch (e: Exception) {
throw IOException("Algorithm not supported.", e)
}
try {