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
WebcomError
corresponding to the givenError
.When
error
is already aWebcomError
, it is returned unchanged. Otherwiseerror
is wrapped as the cause of a newWebcomError
instance.Declaration
Swift
public static func from(_ error: Error) -> WebcomError
Parameters
error
The error to process.
Return Value
A
WebcomError
equal to or wrappingerror
.
-
Indicates whether two instances are equal.
This comparison uses the
String(describing:)
initializer to compare thecause
values of the two instances. Also, two instances with equalcode
values, equalmessage
values but unequalcause
values 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: WebcomError, right: WebcomError) -> Bool
Parameters
left
The first instance to compare.
right
The second instance to compare.
Return Value
true
when the two instances are equal,false
otherwise.
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public var errorDescription: String? { get }