slsDetectorPackage/slsSupportLib/include/sls_detector_exceptions.h
Dhanya Thattil 4ceee97c03
Api (#48)
* WIP

* WIP

* WIP

* cleaned up multi

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* WIP

* split up python module

* WIP

* WIP

* WIP

* WIP

* WIP

* ok

* fixed bugs from rebase

* WIP

* fixed broken test

* WIP

* fixed python

* WIP

* sphinx help

* including new commands

* docs

* WIP

* WIP

* more tests

* added missing public header

* WIP
2019-08-07 11:21:07 +02:00

61 lines
1.2 KiB
C++
Executable File

#pragma once
#include "logger.h"
#include <iostream>
#include <stdexcept>
namespace sls{
struct RuntimeError : public std::runtime_error {
public:
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 {
public:
SharedMemoryError(std::string msg):RuntimeError(msg) {}
};
struct SocketError : public RuntimeError {
public:
SocketError(std::string msg):RuntimeError(msg) {}
};
struct ZmqSocketError : public RuntimeError {
public:
ZmqSocketError(std::string msg):RuntimeError(msg) {}
};
struct NotImplementedError : public RuntimeError {
public:
NotImplementedError(std::string msg):RuntimeError(msg) {}
};
struct DetectorError : public RuntimeError {
public:
DetectorError(std::string msg):RuntimeError(msg) {}
};
struct ReceiverError : public RuntimeError {
public:
ReceiverError(std::string msg):RuntimeError(msg) {}
};
struct GuiError : public RuntimeError {
public:
GuiError(std::string msg):RuntimeError(msg) {}
};
}