Improve error reporting

This commit is contained in:
daylily
2025-03-31 04:19:25 -04:00
parent b10ab3c39d
commit cccf761a34
2 changed files with 1 additions and 4 deletions
-2
View File
@@ -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 {
+1 -2
View File
@@ -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
} }
} }