LivoxGen1: Replace throw with cb+early ret

This commit is contained in:
2025-09-16 18:36:50 -04:00
parent 9e00cd1530
commit 92e55641a0
+5 -3
View File
@@ -304,9 +304,11 @@ extern "C" void livoxGen1_detachDeviceReq(
if (it == g_attachedDevices.end())
{
throw std::runtime_error(
std::string(__func__) +
": Device not found for detachment: " + desc->deviceIdentifier);
std::cerr << std::string(__func__)
<< ": Device not found for detachment: "
<< desc->deviceIdentifier << std::endl;
cb(false, desc);
return;
}
(*livoxProto1.livoxProto1_destroyDeviceReq)(