lib: changed Usb::Error exception to deal in libusb_errcode instead of system
commit9458a0a7c1452af58a782f8d4d92ce0af1033394
authorChris Frey <cdfrey@foursquare.net>
Fri, 17 Jun 2011 22:30:01 +0000 (17 18:30 -0400)
committerChris Frey <cdfrey@foursquare.net>
Fri, 17 Jun 2011 22:30:01 +0000 (17 18:30 -0400)
tree10988074bf9468c65391bae44c7f6a784a33847f
parent8d7075681be2efeb6a8f262b9e74d1056987acf7
lib: changed Usb::Error exception to deal in libusb_errcode instead of system

No error information should ever be lost, and in the libusb translation
code, there was a slight possibility that it could be lost.

This commit makes sure that the Usb::Error exception always stores the
low level errcode, and adds a system_errcode() function to translate
it for error handling purposes, such as for common errors like -EBUSY.
gui/src/main.cc
src/probe.cc
src/usbwrap.cc
src/usbwrap.h
src/usbwrap_libusb.cc
src/usbwrap_libusb_1_0.cc