Skip to content

Commit

Permalink
chore: Use CameraRuntimeError if device is null
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Feb 23, 2024
1 parent 5ab7b29 commit 83b852a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package/src/Camera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
)
}
Expand Down

0 comments on commit 83b852a

Please sign in to comment.