NSError(CBL)

@interface NSError (CBL)

NSError helpers for CascableCore.

  • Create an error with the given raw camera response code in the given domain.

    Declaration

    Objective-C

    + (NSError *_Nonnull)errorWithCameraResponseCode:(NSUInteger)code
                                            inDomain:(CBLErrorCameraDomain)domain;

    Swift

    /*not inherited*/ init(cameraResponseCode code: UInt, in domain: CBLErrorCameraDomain)

    Parameters

    code

    The raw camera error code.

    domain

    The domain in which to translate error codes.

  • Create an error with the given universal error code.

    Declaration

    Objective-C

    + (NSError *_Nonnull)errorWithCBLErrorCode:(CBLErrorCode)code;

    Swift

    /*not inherited*/ init(cblErrorCode code: CascableCoreErrorCode)
  • Create an error with the given universal error code and description.

    Declaration

    Objective-C

    + (NSError *_Nonnull)errorWithCBLErrorCode:(CBLErrorCode)code
                                   description:(NSString *_Nonnull)description;

    Swift

    /*not inherited*/ init(cblErrorCode code: CascableCoreErrorCode, description: String)
  • Create an error with the given universal error code and user info dictionary.

    Declaration

    Objective-C

    + (NSError *_Nonnull)errorWithCBLErrorCode:(CBLErrorCode)code
                                      userInfo:(NSDictionary *_Nullable)userInfo;

    Swift

    /*not inherited*/ init(cblErrorCode code: CascableCoreErrorCode, userInfo: [AnyHashable : Any]? = nil)
  • Create an error with the given universal error code and underlying error.

    Declaration

    Objective-C

    + (NSError *_Nonnull)errorWithCBLErrorCode:(CBLErrorCode)code
                               underlyingError:(NSError *_Nullable)underlying;

    Swift

    /*not inherited*/ init(cblErrorCode code: CascableCoreErrorCode, underlyingError underlying: Error?)