LivoxGen1: Replace throw with cb+early ret
This commit is contained in:
@@ -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)(
|
||||
|
||||
Reference in New Issue
Block a user