handling start acq call back exception

This commit is contained in:
maliakal_d 2020-11-17 13:34:51 +01:00
parent 0cb7d62ad5
commit f19bc8880a
2 changed files with 11 additions and 5 deletions

View File

@ -497,10 +497,15 @@ void Implementation::startReceiver() {
// callbacks
if (startAcquisitionCallBack) {
try {
startAcquisitionCallBack(filePath, fileName, fileIndex,
(generalData->imageSize) +
(generalData->fifoBufferHeaderSize),
pStartAcquisition);
} catch (const std::exception &e) {
throw sls::RuntimeError("Start Acquisition Callback Error: " +
std::string(e.what()));
}
if (rawDataReadyCallBack != nullptr) {
LOG(logINFO) << "Data Write has been defined externally";
}

View File

@ -28,7 +28,8 @@ int StartAcq(std::string filepath, std::string filename, uint64_t fileindex,
<< " filename:" << filename << " fileindex:" << fileindex
<< " datasize:" << datasize << " ####";
throw std::runtime_error("start acquisition call back error");
throw std::runtime_error(
"Throwing exception from start acquisition call back");
return 0;
}