Sep05Exception

open class Sep05Exception(message: String, cause: Throwable? = null) : Exception

Base exception class for SEP-5 key derivation errors.

All SEP-5-specific exceptions extend this class to enable unified error handling while providing specific error types for different failure scenarios.

This exception hierarchy allows applications to handle key derivation errors at different levels:

  • Catch Sep05Exception for general key derivation error handling

  • Catch specific subclasses for precise error recovery

Common error scenarios:

Example - General error handling:

try {
val m = Mnemonic.from(phrase)
} catch (e: InvalidWordException) {
println("Unknown word '${e.word}' in ${e.language.name} word list")
} catch (e: InvalidChecksumException) {
println("Mnemonic checksum failed, check for typos")
} catch (e: Sep05Exception) {
println("Key derivation error: ${e.message}")
}

See also:

Inheritors

Constructors

Link copied to clipboard
constructor(message: String, cause: Throwable? = null)

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