chore: Use CameraRuntimeError if device is null

This commit is contained in:
Marc Rousavy 2024-02-23 10:43:50 +01:00
parent 5ab7b291db
commit 83b852acd0
No known key found for this signature in database
GPG Key ID: 83BEF0F19E8F5321

View File

@ -464,7 +464,8 @@ export class Camera extends React.PureComponent<CameraProps, CameraState> {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (device == null) {
throw new Error(
throw new CameraRuntimeError(
'device/no-device',
'Camera: `device` is null! Select a valid Camera device. See: https://mrousavy.com/react-native-vision-camera/docs/guides/devices',
)
}