Contract Spec Exception
open class ContractSpecException(message: String, val functionName: String? = null, val argumentName: String? = null, val entryName: String? = null, cause: Throwable? = null) : ContractException
Exception thrown when ContractSpec operations fail.
This exception is used for all type conversion and specification-related errors when using com.soneso.stellar.sdk.contract.ContractSpec to convert native Kotlin types to Stellar XDR types.
Usage
throw ContractSpecException.functionNotFound("myFunction")
throw ContractSpecException.argumentNotFound("amount", functionName = "transfer")
throw ContractSpecException.invalidType("Expected Int, got String")Content copied to clipboard