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":
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]);