Skip to content

Commit 2e1b5e8

Browse files
committed
add comments for error codes
1 parent 824bc16 commit 2e1b5e8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

ios/Classes/MobileScannerErrorCodes.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ struct MobileScannerErrorCodes {
1919
// The error code 'BARCODE_ERROR' does not have an error message,
2020
// because it uses the error message from the undelying error.
2121
static let BARCODE_ERROR = "MOBILE_SCANNER_BARCODE_ERROR"
22+
// The error code 'CAMERA_ERROR' does not have an error message,
23+
// because it uses the error message from the underlying error.
2224
static let CAMERA_ERROR = "MOBILE_SCANNER_CAMERA_ERROR"
2325
static let GENERIC_ERROR = "MOBILE_SCANNER_GENERIC_ERROR"
2426
static let GENERIC_ERROR_MESSAGE = "An unknown error occurred."
27+
// This message is used with the 'GENERIC_ERROR' error code.
2528
static let INVALID_ZOOM_SCALE_ERROR_MESSAGE = "The zoom scale should be between 0 and 1 (both inclusive)"
2629
static let NO_CAMERA_ERROR = "MOBILE_SCANNER_NO_CAMERA_ERROR"
2730
static let NO_CAMERA_ERROR_MESSAGE = "No cameras available."

macos/mobile_scanner/Sources/mobile_scanner/MobileScannerErrorCodes.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ struct MobileScannerErrorCodes {
1313
// The error code 'BARCODE_ERROR' does not have an error message,
1414
// because it uses the error message from the undelying error.
1515
static let BARCODE_ERROR = "MOBILE_SCANNER_BARCODE_ERROR"
16+
// The error code 'CAMERA_ERROR' does not have an error message,
17+
// because it uses the error message from the underlying error.
1618
static let CAMERA_ERROR = "MOBILE_SCANNER_CAMERA_ERROR"
1719
static let NO_CAMERA_ERROR = "MOBILE_SCANNER_NO_CAMERA_ERROR"
1820
static let NO_CAMERA_ERROR_MESSAGE = "No cameras available."

0 commit comments

Comments
 (0)