diff --git a/libsignal/src/main/java/org/session/libsignal/crypto/MnemonicCodec.kt b/libsignal/src/main/java/org/session/libsignal/crypto/MnemonicCodec.kt index 12cb092b00..b0d3966905 100644 --- a/libsignal/src/main/java/org/session/libsignal/crypto/MnemonicCodec.kt +++ b/libsignal/src/main/java/org/session/libsignal/crypto/MnemonicCodec.kt @@ -83,8 +83,8 @@ class MnemonicCodec(private val loadFileContents: (String) -> String) { val prefixLength = languageConfiguration.prefixLength val n = truncatedWordSet.size.toLong() - if (mnemonic.isEmpty()) throw IllegalArgumentException() - if (words.isEmpty()) throw IllegalArgumentException() + if (mnemonic.isEmpty()) throw DecodingError.InputTooShort + if (words.isEmpty()) throw DecodingError.InputTooShort fun String.prefix() = substring(0 until prefixLength)