JudoError

public struct JudoError: ErrorType

JudoError

The JudoError object holds all the information about errors that occurred within the SDK or at any stage when making a call to the judo API

  • The judo error code

    Declaration

    Swift

    public var code: JudoErrorCode
  • The message of the error

    Declaration

    Swift

    public var message: String? = nil
  • The category of the error

    Declaration

    Swift

    public var category: JudoErrorCategory? = nil
  • An array of model errors if available

    Declaration

    Swift

    public var details: [JudoModelError]? = nil
  • Undocumented

    Declaration

    Swift

    public struct JudoError: ErrorType
  • A reference for a NSError version of the receiver

    Declaration

    Swift

    public var bridgedError: NSError? = nil
  • A payload if available

    Declaration

    Swift

    public var payload: JSONDictionary? = nil
  • An explanation if available (nil by default)

    Declaration

    Swift

    public var explanation: String? = nil
  • A resolution if available (nil by default)

    Declaration

    Swift

    public var resolution: String? = nil
  • domain (mandatory string for ErrorType subclassing)

    Declaration

    Swift

    public var domain: String { return JudoErrorDomain }
  • _domain (mandatory string for ErrorType subclassing)

    Declaration

    Swift

    public var _domain: String { return JudoErrorDomain }
  • code (mandatory string for ErrorType subclassing)

    Declaration

    Swift

    public var _code: Int { return self.code.rawValue }
  • Initializer for an API level error

    Declaration

    Swift

    public init(_ code: JudoErrorCode, dict: JSONDictionary? = nil, _ message: String? = nil, _ category: JudoErrorCategory? = nil, details: [JudoModelError]? = nil, bridgedError: NSError? = nil)

    Parameters

    code

    error code

    dict

    error details dictionary

    Return Value

    a JudoError object

  • Initializer for a 3DS request error object

    Declaration

    Swift

    public init(_ code: JudoErrorCode, payload: JSONDictionary)

    Parameters

    code

    a JudoErrorCode

    payload

    a payload to pass on with the error

    Return Value

    a JudoError object

  • Bridge an NSError to JudoError

    Declaration

    Swift

    public static func fromNSError(error: NSError) -> JudoError

    Parameters

    error

    the NSError to bridge from

    Return Value

    a JudoError object

  • Get the raw value of the code of the receiver

    Declaration

    Swift

    public func rawValue() -> Int

    Return Value

    judo error code as Integer

  • Bridge an object of JudoError type to NSError

    Declaration

    Swift

    public func toNSError() -> NSError

    Return Value

    an NSError object