From 1a0cddf322bc27cdf5bc08ed034841b212bf47f3 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 12 Feb 2022 10:23:56 +0100 Subject: [PATCH] and catch & show error at another place --- .../simplemobiletools/flashlight/helpers/MarshmallowCamera.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MarshmallowCamera.kt b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MarshmallowCamera.kt index 6001a29..1ab3d2e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MarshmallowCamera.kt +++ b/app/src/main/kotlin/com/simplemobiletools/flashlight/helpers/MarshmallowCamera.kt @@ -17,7 +17,8 @@ internal class MarshmallowCamera constructor(val context: Context) { init { try { cameraId = manager.cameraIdList[0] ?: "0" - } catch (ignored: Exception) { + } catch (e: Exception) { + context.showErrorToast(e) } }