CPError

Objective-C

@interface CPError : NSError

Swift

class CPError : NSError

Defines the cause of an error

@since 1.0.0

  • Time(second) value for retrying erroneous action

    Declaration

    Objective-C

    @property (nonatomic) CGFloat retryAfter;

    Swift

    var retryAfter: CGFloat { get set }

    Return Value

    CGFloat @since 1.0.0

  • Creates an error message with specified description message

    @since 1.0.0

    Declaration

    Objective-C

    - (nonnull CPError *)initWithDomain:(nonnull NSString *)domain
                                   code:(CPErrorType)code
                            description:(nonnull NSString *)descriptionString;

    Swift

    init(domain: String, code: CPErrorType, description descriptionString: String)

    Parameters

    domain

    specific error domain of the object

    code

    specific error code of the error

    descriptionString

    specify error with this message string

    Return Value

    New CPError object

  • Undocumented

    Declaration

    Objective-C

    - (CPError *)initWithDomain:(NSString *)domain genericCode:(NSInteger)code description:(NSString *) descriptionString;

    Swift

    init(domain: String, genericCode code: Int, description descriptionString: String)