format + exception.cpp

This commit is contained in:
Erik Frojdh
2020-05-13 14:48:52 +02:00
parent f0f97f265a
commit 3962714b48
14 changed files with 63 additions and 39 deletions

View File

@ -0,0 +1,23 @@
#include "sls_detector_exceptions.h"
#include "logger.h"
namespace sls {
RuntimeError::RuntimeError() : runtime_error("SLS Detector Package Failed") {
LOG(logERROR) << "SLS Detector Package Failed";
}
RuntimeError::RuntimeError(const std::string &msg) : runtime_error(msg) {
LOG(logERROR) << msg;
}
RuntimeError::RuntimeError(const char *msg) : runtime_error(msg) {
LOG(logERROR) << msg;
}
SharedMemoryError::SharedMemoryError(const std::string &msg)
: RuntimeError(msg) {}
SocketError::SocketError(const std::string &msg) : RuntimeError(msg) {}
ZmqSocketError::ZmqSocketError(const std::string &msg) : RuntimeError(msg) {}
NotImplementedError::NotImplementedError(const std::string &msg)
: RuntimeError(msg) {}
DetectorError::DetectorError(const std::string &msg) : RuntimeError(msg) {}
ReceiverError::ReceiverError(const std::string &msg) : RuntimeError(msg) {}
GuiError::GuiError(const std::string &msg) : RuntimeError(msg) {}
} // namespace sls