Update ERRORS.md

This commit is contained in:
Marc Rousavy 2021-02-22 14:33:55 +01:00
parent a2ab2767a1
commit b9d5bd0294

View File

@ -25,6 +25,9 @@ switch (error.code) {
case "device/microphone-unavailable": case "device/microphone-unavailable":
console.log("This camera device does not have a microphone.") console.log("This camera device does not have a microphone.")
break break
case "capture/recording-in-progress":
console.log("Another recording is already in progress!")
break
default: default:
console.error(error) console.error(error)
break break
@ -79,14 +82,14 @@ function App() {
const photo = await camera.current.takePhoto() const photo = await camera.current.takePhoto()
} catch (e) { } catch (e) {
if (e instanceof CameraCaptureError) { if (e instanceof CameraCaptureError) {
switch (e.code) { switch (e.code) {
case "file-io-error": case "file-io-error":
console.error("Failed to write photo to disk!") console.error("Failed to write photo to disk!")
break break
default: default:
console.error(e) console.error(e)
break break
} }
} }
} }
}, [camera]); }, [camera]);