InvalidMnemonicException

Exception thrown when a mnemonic phrase is invalid.

This exception indicates general mnemonic validation failures that are not covered by more specific exceptions like InvalidChecksumException or InvalidWordException.

Common causes:

  • Empty mnemonic phrase

  • Invalid word count (must be 12, 15, 18, 21, or 24 words)

  • Null or blank input

Example:

try {
val m = Mnemonic.from("")
} catch (e: InvalidMnemonicException) {
println("Invalid mnemonic: ${e.message}")
}

See also:

Parameters

message

Description of the validation failure

Constructors

Link copied to clipboard
constructor(message: String)

Properties

Link copied to clipboard
expect open val cause: Throwable?
Link copied to clipboard
expect open val message: String?

Functions

Link copied to clipboard
open override fun toString(): String