OPError
@objc
public class OPError : NSErrorError class for all OloPay-pecific errors
Errors will come back as either Error or NSError instances. To get an instance of this class
just check that it is the correct type and cast to OPError.
func someMethod(error: Error?) {
    if let opError = error as? OPError {
        //Do something with the error
    }
}
- 
                  
                  Domain for all OPError instances DeclarationSwift @objc public static let oloPayDomain: String
- 
                  
                  Error type key for the userInfoproperty. This can be used to access the error type, but theerrorTypeproperty exposes this information directlyDeclarationSwift @objc public static let errorTypeKey: String
- 
                  
                  Card error type key for the userInfoproperty. This can be used to access the card error type, but thecardErrorTypeproperty exposes this information directlyImportant This key only exists in theuserInfodictionary if the error represents a card errorDeclarationSwift @objc public static let cardErrorTypeKey: String
- 
                  
                  Create an OPErrorinstance for a card error. Useful for testing purposesDeclarationSwift @objc public init(cardErrorType: OPCardErrorType, description: String)
- 
                  
                  Create an OPErrorinstance (other than card errors). Useful for testing purposesDeclarationSwift @objc public init(errorType: OPErrorType, description: String)ParameterserrorTypeThe type of error descriptionThe description for the error 
- 
                  
                  The type of error DeclarationSwift public var errorType: OPErrorType { get }
- 
                  
                  If errorTypeisOPCardErrorType.cardError, this holds the type of error. For any other error type this isnilDeclarationSwift public var cardErrorType: OPCardErrorType? { get }
- 
                  
                  If errorTypeisOPCardErrorType.cardError, this holds a user-friendly message that can be displayed to the user. For any other error type this isnilNote This is a convenience property that is functionally equivalent to usinglocalizedDescriptionDeclarationSwift public var cardErrorMessage: String? { get }
 OPError Class Reference
        OPError Class Reference