From b9d5bd02942e4359968c05918da15795cfd6025c Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Mon, 22 Feb 2021 14:33:55 +0100 Subject: [PATCH] Update ERRORS.md --- docs/ERRORS.md | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/ERRORS.md b/docs/ERRORS.md index 6e29f75..27c0bbd 100644 --- a/docs/ERRORS.md +++ b/docs/ERRORS.md @@ -25,6 +25,9 @@ switch (error.code) { case "device/microphone-unavailable": console.log("This camera device does not have a microphone.") break + case "capture/recording-in-progress": + console.log("Another recording is already in progress!") + break default: console.error(error) break @@ -79,14 +82,14 @@ function App() { const photo = await camera.current.takePhoto() } catch (e) { if (e instanceof CameraCaptureError) { - switch (e.code) { - case "file-io-error": - console.error("Failed to write photo to disk!") - break - default: - console.error(e) - break - } + switch (e.code) { + case "file-io-error": + console.error("Failed to write photo to disk!") + break + default: + console.error(e) + break + } } } }, [camera]);