Improve error reporting
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Button } from '$lib/components/ui/button'
|
import { Button } from '$lib/components/ui/button'
|
||||||
|
|
||||||
import IconPlugConnect from '~icons/material-symbols/plug-connect'
|
|
||||||
|
|
||||||
const hid = navigator.hid
|
const hid = navigator.hid
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
import { Button } from '$lib/components/ui/button'
|
import { Button } from '$lib/components/ui/button'
|
||||||
import { toast } from 'svelte-sonner'
|
import { toast } from 'svelte-sonner'
|
||||||
|
|
||||||
import IconUpload from '~icons/material-symbols/upload-2'
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
device: HIDDevice | null
|
device: HIDDevice | null
|
||||||
data: number[] | null
|
data: number[] | null
|
||||||
@@ -23,6 +21,7 @@
|
|||||||
await device.open()
|
await device.open()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
toast.error(`Unable to open device: ${e}`)
|
toast.error(`Unable to open device: ${e}`)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user