Sep24Exception

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

Base exception class for SEP-24 Interactive Deposit/Withdrawal errors.

All SEP-24-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 interactive transfer errors at different levels:

  • Catch Sep24Exception for general SEP-24 error handling

  • Catch specific subclasses for precise error recovery

Common error scenarios:

Example - General error handling:

try {
val response = sep24Service.deposit(request, jwt)
} catch (e: Sep24AuthenticationRequiredException) {
// Re-authenticate via SEP-10
println("Authentication required, please re-authenticate")
} catch (e: Sep24InvalidRequestException) {
// Invalid request parameters
println("Bad request: ${e.message}")
} catch (e: Sep24Exception) {
// Other SEP-24 errors
println("Transfer 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