new exceptions

This commit is contained in:
Erik Frojdh
2019-03-14 16:37:36 +01:00
parent 5235a87e93
commit 9639e480d9
9 changed files with 113 additions and 58 deletions

View File

@ -314,7 +314,7 @@ void multiSlsDetector::initSharedMemory(bool verify) {
FILE_LOG(logERROR) << "Multi shared memory (" << detId << ") version mismatch "
"(expected 0x"
<< std::hex << MULTI_SHMVERSION << " but got 0x" << multi_shm()->shmversion << std::dec;
throw SharedMemoryException();
throw SharedMemoryError("Shared memory version mismatch!");
}
}
}

View File

@ -12,6 +12,8 @@
#include <cstdlib>
#include <memory>
using sls::RuntimeError;
inline int dummyCallback(detectorData *d, int p, void *) {
std::cout << "got data " << p << std::endl;
return 0;
@ -73,7 +75,7 @@ class multiSlsDetectorClient {
try {
localDet = sls::make_unique<multiSlsDetector>(parser.multi_id(), verify, update);
detPtr = localDet.get();
} catch (const SlsDetectorPackageExceptions &e) {
} catch (const RuntimeError &e) {
/*std::cout << e.GetMessage() << std::endl;*/
return;
} catch (...) {