mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +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";
|
||||
}
|
||||
// callback
|
||||
if (acquisitionFinishedCallBack)
|
||||
acquisitionFinishedCallBack((tot / numThreads),
|
||||
pAcquisitionFinished);
|
||||
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
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user