EosioError
open class EosioError : Error, CustomStringConvertible, Codable
extension EosioError: LocalizedError
An error for EOSIO SDK for Swift libraries containing an error code, reason, and the original error.
-
An
EosioErrorCode
.Declaration
Swift
public var errorCode: EosioErrorCode
-
The reason for the error as a human-readable string.
Declaration
Swift
public var reason: String
-
The original error.
Declaration
Swift
public var originalError: NSError?
-
Descriptions for the various
EosioErrorCode
members.Declaration
Swift
public var description: String { get }
-
Initialize an
EosioError
.Declaration
Swift
public init(_ errorCode: EosioErrorCode, reason: String, originalError: NSError? = nil)
Parameters
errorCode
An
EosioErrorCode
.reason
The reason for the error as a human-readable string.
originalError
The original error.
-
Returns an error description.
Declaration
Swift
public var errorDescription: String? { get }