CameraError

sealed interface CameraError

A failure to obtain a reading, reported on MrzScanResult.CaptureError; never thrown.

Each member has a stable English code to switch on. A report is terminal when it ends the camera session and non-terminal when the session stays running; each member says which.

Since

0.2.0

Inheritors

Types

Link copied to clipboard
data class CameraInUse(val message: String) : CameraError

Another client holds the camera.

Link copied to clipboard
data class CameraUnavailable(val message: String) : CameraError

The camera could not be opened, or the platform reported a failure.

Link copied to clipboard
data class OcrFailed(val message: String) : CameraError

The OCR engine failed on a frame or saved image, for example by throwing.

Link copied to clipboard
data class PermissionDenied(val message: String) : CameraError

The camera permission is not granted.

Properties

Link copied to clipboard
abstract val code: String

A stable English code to switch on, for example camera.ocr_failed.

Link copied to clipboard
abstract val message: String

Diagnostic detail, not for display and never document data.