diff --git a/senseApis/livoxGen1/livoxGen1.cpp b/senseApis/livoxGen1/livoxGen1.cpp index 98eec22..9eb6836 100644 --- a/senseApis/livoxGen1/livoxGen1.cpp +++ b/senseApis/livoxGen1/livoxGen1.cpp @@ -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)(