diff --git a/src/ds5/ds5-fw-update-device.cpp b/src/ds5/ds5-fw-update-device.cpp index 1c2917fcafc..8b2cd3935c7 100644 --- a/src/ds5/ds5-fw-update-device.cpp +++ b/src/ds5/ds5-fw-update-device.cpp @@ -22,10 +22,10 @@ namespace librealsense bool ds_update_device::check_fw_compatibility(const std::vector& image) const { std::string fw_version = extract_firmware_version_string((const void*)image.data(), image.size()); - + auto device_pid = _usb_device->get_info().pid; auto it = ds::device_to_fw_min_version.find(_usb_device->get_info().pid); if (it == ds::device_to_fw_min_version.end()) - throw std::runtime_error("Minimum firmware version has not been defined for this device!"); + throw std::runtime_error(to_string() << "Min and Max firmware versions have not been defined for this device: " << device_pid); return (firmware_version(fw_version) >= firmware_version(it->second)); } diff --git a/src/ivcam/sr300-fw-update-device.cpp b/src/ivcam/sr300-fw-update-device.cpp index d994057e366..0f5541353ab 100644 --- a/src/ivcam/sr300-fw-update-device.cpp +++ b/src/ivcam/sr300-fw-update-device.cpp @@ -26,10 +26,10 @@ namespace librealsense bool sr300_update_device::check_fw_compatibility(const std::vector& image) const { std::string fw_version = extract_firmware_version_string((const void*)image.data(), image.size()); - - auto min_max_fw_it = device_to_fw_min_max_version.find(_usb_device->get_info().pid); + auto device_pid = _usb_device->get_info().pid; + auto min_max_fw_it = device_to_fw_min_max_version.find(device_pid); if (min_max_fw_it == device_to_fw_min_max_version.end()) - throw std::runtime_error("Min and Max firmware versions have not been defined for this device!"); + throw std::runtime_error(to_string() << "Min and Max firmware versions have not been defined for this device: " << device_pid); // advanced SR3XX devices do not fit the "old" fw versions and // legacy SR3XX devices do not fit the "new" fw versions diff --git a/src/l500/l500-fw-update-device.cpp b/src/l500/l500-fw-update-device.cpp index b841216b408..3ef017ea56a 100644 --- a/src/l500/l500-fw-update-device.cpp +++ b/src/l500/l500-fw-update-device.cpp @@ -22,10 +22,10 @@ namespace librealsense bool l500_update_device::check_fw_compatibility(const std::vector& image) const { std::string fw_version = extract_firmware_version_string((const void*)image.data(), image.size()); - + auto device_pid = _usb_device->get_info().pid; auto min_max_fw_it = ivcam2::device_to_fw_min_max_version.find(_usb_device->get_info().pid); if (min_max_fw_it == ivcam2::device_to_fw_min_max_version.end()) - throw std::runtime_error("Min and Max firmware versions have not been defined for this device!"); + throw std::runtime_error(to_string() << "Min and Max firmware versions have not been defined for this device: " << device_pid); // Limit L515 to FW versions within the 1.5.1.3-1.99.99.99 range to differenciate from the other products return (firmware_version(fw_version) >= firmware_version(min_max_fw_it->second.first)) &&