Error Handling for Document and Face Capture

Error Handling for Document and Face Capture

The error received in the completion handler for both document/face capture is of the type OkayCamError:

public enum OkayCamError: Error {
    // No error at all.
    case noError
    // Error due to invalid parameter value in config object.
    case invalidConfig(_ msg: String)
    // Error in capturing image.
    case imageCapture(_ msg: String)
    // Error due to invalid license usage.
    case invalidLicense
    // Error due to user clicking cancel and going back.
    case userCancelled
    // Error due to camera permission denied by user.
    case cameraPermission
    // Error due to camera device.
    case camera(_ msg: String)
    // Any other errors.
    case miscellaneous(_ msg: String)
    //Failed IADBundle Creation
    case failedToCreateIADBundle
}

Last updated

Was this helpful?