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())
|
if (it == g_attachedDevices.end())
|
||||||
{
|
{
|
||||||
throw std::runtime_error(
|
std::cerr << std::string(__func__)
|
||||||
std::string(__func__) +
|
<< ": Device not found for detachment: "
|
||||||
": Device not found for detachment: " + desc->deviceIdentifier);
|
<< desc->deviceIdentifier << std::endl;
|
||||||
|
cb(false, desc);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*livoxProto1.livoxProto1_destroyDeviceReq)(
|
(*livoxProto1.livoxProto1_destroyDeviceReq)(
|
||||||
|
|||||||
Reference in New Issue
Block a user