Function: tryParseNativeCameraError()
tryParseNativeCameraError<
T
>(nativeError
):CameraCaptureError
|CameraRuntimeError
|T
Tries to parse an error coming from native to a typed JS camera error.
Type Parameters​
• T
Parameters​
• nativeError: T
The native error instance. This is a JSON in the legacy native module architecture.
Returns​
CameraCaptureError
| CameraRuntimeError
| T
A CameraRuntimeError
or CameraCaptureError
, or the nativeError
itself if it's not parsable
Method​
Defined in​
CameraError.ts:217