thegecko / webusb

Node.js implementation of the WebUSB Specification
https://thegecko.github.io/webusb/
MIT License
183 stars 27 forks source link

Reject with error on adapter.open() #23

Closed fnogatz closed 6 years ago

fnogatz commented 6 years ago

I could not call open() on one of my devices, and got only an undefined error object in the catch. The correct error LIBUSB_ERROR_ACCESS would have helped me to easily understand that I would have to call my script as root. This PR raises the catched error.