`CVError` wraps `CVReturn` values to present them as Swift Error values. This type is
used for all errors thrown in the CoreVideo framework. All `CVReturn` values are
provided as static constants.
Members (18)
get · iOS 26.0+
description
TypeScript
getDescription($self: CVError): string
Swift declaration
var description: String { get }
A textual representation of this instance.
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the `String(describing:)`
initializer. This initializer works with any type, and uses the custom
`description` property for types that conform to
`CustomStringConvertible`:
struct Point: CustomStringConvertible {
let x: Int, y: Int
var description: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(describing: p)
print(s)
// Prints "(21, 30)"
The conversion of `p` to a string in the assignment to `s` uses the
`Point` type's `description` property.
get · iOS 26.0+
invalidSize
TypeScript
get invalidSize(): CVError
Swift declaration
static let invalidSize: CVError
The requested size (most likely too big) is not supported for the CVBuffer type.
get · iOS 26.0+
unsupported
TypeScript
get unsupported(): CVError
Swift declaration
static let unsupported: CVError
This operation is unsupported on this data type.
get · iOS 26.0+
internalError
TypeScript
get internalError(): CVError
Swift declaration
static let internalError: CVError
Error with an undetermined cause.
get · iOS 26.0+
invalidArgument
TypeScript
get invalidArgument(): CVError
Swift declaration
static let invalidArgument: CVError
At least one of the arguments passed in is not valid. Either out of range or the wrong type.
get · iOS 26.0+
allocationFailed
TypeScript
get allocationFailed(): CVError
Swift declaration
static let allocationFailed: CVError
The allocation for a buffer or buffer pool failed. Most likely because of lack of resources.
Throws an instance of `CVError` if `status` is not `kCVReturnSuccess`
get · iOS 26.0+
retry
TypeScript
get retry(): CVError
Swift declaration
static let retry: CVError
A scan hasn't completely traversed the CVBufferPool due to a concurrent operation. The client can retry the scan.
init · iOS 26.0+
init
TypeScript
init(rawValue: number): (CVError) | null
Swift declaration
init?(rawValue: CVReturn)
Creates `CVError` with the given error code. Returns nil if `rawValue` is `kCVReturnSuccess`
get · iOS 26.0+
rawValue
TypeScript
getRawValue($self: CVError): number
Swift declaration
var rawValue: CVReturn
The corresponding value of the raw type.
A new instance initialized with `rawValue` will be equivalent to this
instance. For example:
enum PaperSize: String {
case A4, A5, Letter, Legal
}
let selectedSize = PaperSize.Letter
print(selectedSize.rawValue)
// Prints "Letter"
print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!)
// Prints "true"
set · iOS 26.0+
rawValue
TypeScript
setRawValue($self: CVError, value: number): void
Swift declaration
var rawValue: CVReturn
The corresponding value of the raw type.
A new instance initialized with `rawValue` will be equivalent to this
instance. For example:
enum PaperSize: String {
case A4, A5, Letter, Legal
}
let selectedSize = PaperSize.Letter
print(selectedSize.rawValue)
// Prints "Letter"
print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!)
// Prints "true"