Sep02InvalidAddressException

Exception thrown when a Stellar address has an invalid format.

Indicates that the Stellar address does not conform to the federation protocol format. This typically occurs when:

  • The address is missing the * separator (e.g., "userexample.com")

  • The username part (before *) is empty (e.g., "*example.com")

  • The domain part (after ) is empty (e.g., "user")

  • The address contains multiple * characters (e.g., "userexamplecom")

A valid Stellar address follows the format: username*domain

  • Username: Non-empty string identifying the user

  • Domain: Non-empty domain name of the federation server

  • Separator: Single * character

Recovery actions:

  • Verify the address contains exactly one * separator

  • Ensure both username and domain parts are non-empty

  • Check for typos in the address format

Example - Handle invalid address:

try {
val response = federationService.resolveStellarAddress("user*example.com")
} catch (e: Sep02InvalidAddressException) {
println("Invalid address format: ${e.message}")
// Prompt user to correct the address
}

See also:

Parameters

message

Detailed error message describing the address format issue

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