const string& in exceptions constructor

This commit is contained in:
Erik Frojdh
2020-01-16 11:44:01 +01:00
parent 7a00732fa8
commit 4b69ac5cfc

View File

@ -11,7 +11,7 @@ public:
RuntimeError(): runtime_error("SLS Detector Package Failed") { RuntimeError(): runtime_error("SLS Detector Package Failed") {
FILE_LOG(logERROR) << "SLS Detector Package Failed"; FILE_LOG(logERROR) << "SLS Detector Package Failed";
} }
RuntimeError(std::string msg): runtime_error(msg) { RuntimeError(const std::string& msg): runtime_error(msg) {
FILE_LOG(logERROR) << msg; FILE_LOG(logERROR) << msg;
} }
RuntimeError(const char* msg): runtime_error(msg) { RuntimeError(const char* msg): runtime_error(msg) {
@ -21,37 +21,37 @@ public:
struct SharedMemoryError : public RuntimeError { struct SharedMemoryError : public RuntimeError {
public: public:
SharedMemoryError(std::string msg):RuntimeError(msg) {} SharedMemoryError(const std::string& msg):RuntimeError(msg) {}
}; };
struct SocketError : public RuntimeError { struct SocketError : public RuntimeError {
public: public:
SocketError(std::string msg):RuntimeError(msg) {} SocketError(const std::string& msg):RuntimeError(msg) {}
}; };
struct ZmqSocketError : public RuntimeError { struct ZmqSocketError : public RuntimeError {
public: public:
ZmqSocketError(std::string msg):RuntimeError(msg) {} ZmqSocketError(const std::string& msg):RuntimeError(msg) {}
}; };
struct NotImplementedError : public RuntimeError { struct NotImplementedError : public RuntimeError {
public: public:
NotImplementedError(std::string msg):RuntimeError(msg) {} NotImplementedError(const std::string& msg):RuntimeError(msg) {}
}; };
struct DetectorError : public RuntimeError { struct DetectorError : public RuntimeError {
public: public:
DetectorError(std::string msg):RuntimeError(msg) {} DetectorError(const std::string& msg):RuntimeError(msg) {}
}; };
struct ReceiverError : public RuntimeError { struct ReceiverError : public RuntimeError {
public: public:
ReceiverError(std::string msg):RuntimeError(msg) {} ReceiverError(const std::string& msg):RuntimeError(msg) {}
}; };
struct GuiError : public RuntimeError { struct GuiError : public RuntimeError {
public: public:
GuiError(std::string msg):RuntimeError(msg) {} GuiError(const std::string& msg):RuntimeError(msg) {}
}; };
} }