handling acquisition finished callback exception

This commit is contained in:
maliakal_d 2020-11-17 13:38:22 +01:00
parent f19bc8880a
commit a36a294515
2 changed files with 15 additions and 5 deletions

View File

@ -599,9 +599,16 @@ void Implementation::stopReceiver() {
LOG(logINFORED) << "Deactivated Receiver";
}
// callback
if (acquisitionFinishedCallBack)
if (acquisitionFinishedCallBack) {
try {
acquisitionFinishedCallBack((tot / numThreads),
pAcquisitionFinished);
} catch (const std::exception &e) {
throw sls::RuntimeError(
"Acquisition Finished Callback Error: " +
std::string(e.what()));
}
}
}
// change status

View File

@ -28,8 +28,8 @@ int StartAcq(std::string filepath, std::string filename, uint64_t fileindex,
<< " filename:" << filename << " fileindex:" << fileindex
<< " datasize:" << datasize << " ####";
throw std::runtime_error(
"Throwing exception from start acquisition call back");
/*throw std::runtime_error(
"Throwing exception from start acquisition call back");*/
return 0;
}
@ -40,6 +40,9 @@ int StartAcq(std::string filepath, std::string filename, uint64_t fileindex,
*/
void AcquisitionFinished(uint64_t frames, void *p) {
std::cout << "#### AcquisitionFinished: frames:" << frames << " ####";
throw std::runtime_error(
"Throwing exception from acquisition finished call back");
}
/**