mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Return Try.Failure instead of throwing exception.
This commit is contained in:
parent
c4f2eeeab7
commit
319667096f
@ -87,7 +87,7 @@ internal class DefaultFileService @Inject constructor(
|
||||
if (elementToDecrypt != null) {
|
||||
Timber.v("## decrypt file")
|
||||
inputStream = MXEncryptedAttachments.decryptAttachment(inputStream, elementToDecrypt)
|
||||
?: throw IllegalStateException("Decryption error")
|
||||
?: return@flatMap Try.Failure(IllegalStateException("Decryption error"))
|
||||
}
|
||||
|
||||
writeToFile(inputStream, destFile)
|
||||
|
Loading…
Reference in New Issue
Block a user