diff --git a/src/DeviceImpl.cpp b/src/DeviceImpl.cpp index f434edc..d6b6e1f 100644 --- a/src/DeviceImpl.cpp +++ b/src/DeviceImpl.cpp @@ -65,7 +65,7 @@ std::shared_ptr LibUSB::DeviceImpl::getDeviceDescripto if (Result != LIBUSB_SUCCESS) { - throw std::exception("libusb_get_device_descriptor() failed."); + throw std::runtime_error("libusb_get_device_descriptor() failed."); } } @@ -87,7 +87,7 @@ void LibUSB::DeviceImpl::Open() if (m_pDevice.get() == nullptr) { - throw std::exception("Open() failed - (There is no device!)"); + throw std::runtime_error("Open() failed - (There is no device!)"); } if (m_pHandle.get() == nullptr) diff --git a/src/LibusbImpl.cpp b/src/LibusbImpl.cpp index c7d90a0..84d5cd3 100644 --- a/src/LibusbImpl.cpp +++ b/src/LibusbImpl.cpp @@ -40,7 +40,7 @@ LibUSB::LibUSBImpl::LibUSBImpl() int Result = libusb_init(&pContext); if (Result != LIBUSB_SUCCESS) { - throw std::exception("libusb_init() failed."); + throw std::runtime_error("libusb_init() failed."); } // Store in a shared_ptr