From f80e606c6d82e62df5c31d846c6ff5b1ed339c39 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Tue, 29 Jun 2021 10:14:33 +0200 Subject: [PATCH] fix: Report all errors to JS in `configureSession` --- android/src/main/java/com/mrousavy/camera/CameraView.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/src/main/java/com/mrousavy/camera/CameraView.kt b/android/src/main/java/com/mrousavy/camera/CameraView.kt index aeea8b8..176a049 100644 --- a/android/src/main/java/com/mrousavy/camera/CameraView.kt +++ b/android/src/main/java/com/mrousavy/camera/CameraView.kt @@ -271,6 +271,8 @@ class CameraView(context: Context) : FrameLayout(context), LifecycleOwner { } } catch (e: CameraError) { invokeOnError(e) + } catch (e: Throwable) { + invokeOnError(UnknownCameraError(e)) } } }