EFQRCodeError
public enum EFQRCodeError : Error
All possible errors that could occur when working with EFQRCode.
This enum defines all the error types that can be thrown by EFQRCode operations, including data encoding errors, image generation errors, and internal implementation errors.
## Error Categories
- Data Errors: Related to input data encoding and capacity
- Image Generation Errors: Related to image creation and processing
- Color Space Errors: Related to color space conversion and creation
- Internal Errors: Related to internal implementation issues
## Usage
do {
let generator = try EFQRCode.Generator("Hello World")
let image = try generator.toImage(width: 200)
} catch EFQRCodeError.dataLengthExceedsCapacityLimit {
print("Data is too large for QR code")
} catch EFQRCodeError.text(let text, let encoding) {
print("Cannot encode '\(text)' with \(encoding)")
} catch {
print("Other error: \(error)")
}
-
The data to be encoded exceeds the QR code capacity limit.
Declaration
Swift
case dataLengthExceedsCapacityLimit
-
The text cannot be encoded using the specified encoding.
Declaration
Swift
case text(String, incompatibleWithEncoding: String.Encoding)
-
Failed to convert between color spaces.
Declaration
Swift
case colorSpaceConversionFailure
-
Failed to create a color space.
Declaration
Swift
case colorSpaceCreateFailure
-
Cannot extract color components from CGColor.
Declaration
Swift
case invalidCGColorComponents
-
Cannot create mutable data buffer.
Declaration
Swift
case cannotCreateMutableData
-
Cannot create CGImage destination.
Declaration
Swift
case cannotCreateCGImageDestination
-
Cannot finalize CGImage destination.
Declaration
Swift
case cannotFinalizeCGImageDestination
-
Cannot create CGContext.
Declaration
Swift
case cannotCreateCGContext
-
Cannot create SVG document.
Declaration
Swift
case cannotCreateSVGDocument
-
Cannot create CGImage.
Declaration
Swift
case cannotCreateCGImage
-
Cannot create UIImage.
Declaration
Swift
case cannotCreateUIImage
-
Cannot create image data.
Declaration
Swift
case cannotCreateImageData
-
Cannot create animated image (GIF/APNG).
Declaration
Swift
case cannotCreateAnimatedImage
-
Cannot create video file.
Declaration
Swift
case cannotCreateVideo
-
Internal implementation error.
Declaration
Swift
case internalError(ImplmentationError)
-
Internal implementation error types.
See moreDeclaration
Swift
public enum ImplmentationError