WebcomError
public struct WebcomError : Error, Equatable, CustomStringConvertible, LocalizedError
A value representing an error.
-
A value representing an error code specific to this iOS SDK.
See moreDeclaration
Swift
public enum SDKCode : Hashable, SelfIdentifiable -
A value representing an error code from the back-end.
See moreDeclaration
Swift
public enum BackEndCode : String, Hashable, SelfIdentifiable -
A value representing an error code.
See moreDeclaration
Swift
@frozen public enum Code : Hashable, SelfIdentifiable, CustomStringConvertible
-
The code of the error.
Declaration
Swift
public let code: Code -
A message explaining the error.
Declaration
Swift
public let message: String? -
An underlying error that causes this one.
Declaration
Swift
public let cause: Error?
-
Creates a
WebcomErrorcorresponding to the givenError.When
erroris already aWebcomError, it is returned unchanged. Otherwiseerroris wrapped as the cause of a newWebcomErrorinstance.Declaration
Swift
public static func from(_ error: Error) -> WebcomErrorParameters
errorThe error to process.
Return Value
A
WebcomErrorequal to or wrappingerror.
-
Indicates whether two instances are equal.
This comparison uses the
String(describing:)initializer to compare thecausevalues of the two instances. Also, two instances with equalcodevalues, equalmessagevalues but unequalcausevalues having the same representation according toString(describing:)are considered equal by this method. This is an acceptable approximation as this situation is unlikely to occur.Declaration
Swift
public static func == (left: `Self`, right: `Self`) -> BoolParameters
leftThe first instance to compare.
rightThe second instance to compare.
Return Value
truewhen the two instances are equal,falseotherwise.
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public var errorDescription: String? { get }