Error handling with exceptions in slsDetector and multiSlsDetector (#14)

* less error mask

* removing error mask from slsDetector

* removed ErrorMask

* setonline, setreceiveornline bug fix
This commit is contained in:
Erik Fröjdh
2019-03-20 16:23:41 +01:00
committed by Dhanya Thattil
parent 9d489dc962
commit 03402d0e9e
9 changed files with 521 additions and 1407 deletions

View File

@ -7,6 +7,8 @@
*@short exceptions defined
*/
#include "logger.h"
#include <iostream>
#include <stdexcept>
@ -14,8 +16,15 @@ namespace sls{
struct RuntimeError : public std::runtime_error {
public:
RuntimeError(): runtime_error("SLS Detector Package Failed") {}
RuntimeError(std::string msg): runtime_error(msg) {}
RuntimeError(): runtime_error("SLS Detector Package Failed") {
FILE_LOG(logERROR) << "SLS Detector Package Failed";
}
RuntimeError(std::string msg): runtime_error(msg) {
FILE_LOG(logERROR) << msg;
}
RuntimeError(const char* msg): runtime_error(msg) {
FILE_LOG(logERROR) << msg;
}
};
struct SharedMemoryError : public RuntimeError {