mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 18:10:40 +02:00
Explicit constructors for exceptions (#791)
* silence warnings * making constructors explicit to avoid unintended conversions * changed struct to class since we already have public: --------- Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
This commit is contained in:
parent
7383b13f16
commit
565858b6c6
@ -5,46 +5,46 @@
|
||||
|
||||
namespace sls {
|
||||
|
||||
struct RuntimeError : public std::runtime_error {
|
||||
class RuntimeError : public std::runtime_error {
|
||||
public:
|
||||
RuntimeError();
|
||||
RuntimeError(const std::string &msg);
|
||||
RuntimeError(const char *msg);
|
||||
explicit RuntimeError(const std::string &msg);
|
||||
explicit RuntimeError(const char *msg);
|
||||
};
|
||||
|
||||
struct SharedMemoryError : public RuntimeError {
|
||||
class SharedMemoryError : public RuntimeError {
|
||||
public:
|
||||
SharedMemoryError(const std::string &msg);
|
||||
explicit SharedMemoryError(const std::string &msg);
|
||||
};
|
||||
|
||||
struct SocketError : public RuntimeError {
|
||||
class SocketError : public RuntimeError {
|
||||
public:
|
||||
SocketError(const std::string &msg);
|
||||
explicit SocketError(const std::string &msg);
|
||||
};
|
||||
|
||||
struct ZmqSocketError : public RuntimeError {
|
||||
class ZmqSocketError : public RuntimeError {
|
||||
public:
|
||||
ZmqSocketError(const std::string &msg);
|
||||
explicit ZmqSocketError(const std::string &msg);
|
||||
};
|
||||
|
||||
struct NotImplementedError : public RuntimeError {
|
||||
class NotImplementedError : public RuntimeError {
|
||||
public:
|
||||
NotImplementedError(const std::string &msg);
|
||||
explicit NotImplementedError(const std::string &msg);
|
||||
};
|
||||
|
||||
struct DetectorError : public RuntimeError {
|
||||
class DetectorError : public RuntimeError {
|
||||
public:
|
||||
DetectorError(const std::string &msg);
|
||||
explicit DetectorError(const std::string &msg);
|
||||
};
|
||||
|
||||
struct ReceiverError : public RuntimeError {
|
||||
class ReceiverError : public RuntimeError {
|
||||
public:
|
||||
ReceiverError(const std::string &msg);
|
||||
explicit ReceiverError(const std::string &msg);
|
||||
};
|
||||
|
||||
struct GuiError : public RuntimeError {
|
||||
class GuiError : public RuntimeError {
|
||||
public:
|
||||
GuiError(const std::string &msg);
|
||||
explicit GuiError(const std::string &msg);
|
||||
};
|
||||
|
||||
} // namespace sls
|
||||
|
Loading…
x
Reference in New Issue
Block a user