mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 03:10:02 +02:00
handling acquisition finished callback exception
This commit is contained in:
parent
f19bc8880a
commit
a36a294515
@ -599,9 +599,16 @@ void Implementation::stopReceiver() {
|
|||||||
LOG(logINFORED) << "Deactivated Receiver";
|
LOG(logINFORED) << "Deactivated Receiver";
|
||||||
}
|
}
|
||||||
// callback
|
// callback
|
||||||
if (acquisitionFinishedCallBack)
|
if (acquisitionFinishedCallBack) {
|
||||||
acquisitionFinishedCallBack((tot / numThreads),
|
try {
|
||||||
pAcquisitionFinished);
|
acquisitionFinishedCallBack((tot / numThreads),
|
||||||
|
pAcquisitionFinished);
|
||||||
|
} catch (const std::exception &e) {
|
||||||
|
throw sls::RuntimeError(
|
||||||
|
"Acquisition Finished Callback Error: " +
|
||||||
|
std::string(e.what()));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// change status
|
// change status
|
||||||
|
@ -28,8 +28,8 @@ int StartAcq(std::string filepath, std::string filename, uint64_t fileindex,
|
|||||||
<< " filename:" << filename << " fileindex:" << fileindex
|
<< " filename:" << filename << " fileindex:" << fileindex
|
||||||
<< " datasize:" << datasize << " ####";
|
<< " datasize:" << datasize << " ####";
|
||||||
|
|
||||||
throw std::runtime_error(
|
/*throw std::runtime_error(
|
||||||
"Throwing exception from start acquisition call back");
|
"Throwing exception from start acquisition call back");*/
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,6 +40,9 @@ int StartAcq(std::string filepath, std::string filename, uint64_t fileindex,
|
|||||||
*/
|
*/
|
||||||
void AcquisitionFinished(uint64_t frames, void *p) {
|
void AcquisitionFinished(uint64_t frames, void *p) {
|
||||||
std::cout << "#### AcquisitionFinished: frames:" << frames << " ####";
|
std::cout << "#### AcquisitionFinished: frames:" << frames << " ####";
|
||||||
|
|
||||||
|
throw std::runtime_error(
|
||||||
|
"Throwing exception from acquisition finished call back");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user