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