mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
format + exception.cpp
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
#include "ServerInterface.h"
|
||||
#include "logger.h"
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
|
@ -2,13 +2,13 @@
|
||||
|
||||
namespace sls {
|
||||
|
||||
std::string ToString(const slsDetectorDefs::ROI& roi){
|
||||
std::string ToString(const slsDetectorDefs::ROI &roi) {
|
||||
std::ostringstream oss;
|
||||
oss << '[' << roi.xmin << ", " << roi.xmax << ']';
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
std::ostream&operator<<(std::ostream &os, const slsDetectorDefs::ROI& roi){
|
||||
std::ostream &operator<<(std::ostream &os, const slsDetectorDefs::ROI &roi) {
|
||||
return os << ToString(roi);
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "UdpRxSocket.h"
|
||||
#include "logger.h"
|
||||
#include "network_utils.h"
|
||||
#include "sls_detector_exceptions.h"
|
||||
#include <cstdint>
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "ZmqSocket.h"
|
||||
#include "logger.h"
|
||||
#include <arpa/inet.h> //inet_ntoa
|
||||
#include <errno.h>
|
||||
#include <iostream>
|
||||
|
23
slsSupportLib/src/sls_detector_exceptions.cpp
Normal file
23
slsSupportLib/src/sls_detector_exceptions.cpp
Normal 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
|
Reference in New Issue
Block a user