You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PyUSB should raise more accurate errors, such as USBBrokenPipeError instead of USBError for everything so users can treat these exceptions better.
I can create this as a PR if you aggree
The text was updated successfully, but these errors were encountered:
PyUSB could indeed benefit from higher level and more (immediately) informative errors, but that's needs to go beyond replacing
raiseUSBError(..., LIBUSB_ERROR_PIPE, EPIPE)
with
raiseUSBBrokenPipeError()
Most errors that a backend may return depend not only on a situation, but also on the backend, platform and kernel/system driver in use. Not to mention that there are at least 3 different libusb-0.1 implementations...
So a thorough review of common error scenarios, and the many ways in which they can manifest in our backends, would be necessary in order to provide additional higher level errors.
But, despite this caveat, improvements in this area would be very much appreciated.
PyUSB should raise more accurate errors, such as
USBBrokenPipeError
instead ofUSBError
for everything so users can treat these exceptions better.I can create this as a PR if you aggree
The text was updated successfully, but these errors were encountered: