@@ -22,7 +22,7 @@ namespace HighFive {
2222// /
2323class Exception : public std ::exception {
2424 public:
25- Exception (const std::string& err_msg)
25+ explicit Exception (const std::string& err_msg)
2626 : _errmsg(err_msg) {}
2727
2828 Exception (const Exception& other) = default ;
@@ -87,7 +87,7 @@ class Exception: public std::exception {
8787// /
8888class ObjectException : public Exception {
8989 public:
90- ObjectException (const std::string& err_msg)
90+ explicit ObjectException (const std::string& err_msg)
9191 : Exception(err_msg) {}
9292};
9393
@@ -96,7 +96,7 @@ class ObjectException: public Exception {
9696// /
9797class DataTypeException : public Exception {
9898 public:
99- DataTypeException (const std::string& err_msg)
99+ explicit DataTypeException (const std::string& err_msg)
100100 : Exception(err_msg) {}
101101};
102102
@@ -105,7 +105,7 @@ class DataTypeException: public Exception {
105105// /
106106class FileException : public Exception {
107107 public:
108- FileException (const std::string& err_msg)
108+ explicit FileException (const std::string& err_msg)
109109 : Exception(err_msg) {}
110110};
111111
@@ -114,7 +114,7 @@ class FileException: public Exception {
114114// /
115115class DataSpaceException : public Exception {
116116 public:
117- DataSpaceException (const std::string& err_msg)
117+ explicit DataSpaceException (const std::string& err_msg)
118118 : Exception(err_msg) {}
119119};
120120
@@ -123,7 +123,7 @@ class DataSpaceException: public Exception {
123123// /
124124class AttributeException : public Exception {
125125 public:
126- AttributeException (const std::string& err_msg)
126+ explicit AttributeException (const std::string& err_msg)
127127 : Exception(err_msg) {}
128128};
129129
@@ -132,7 +132,7 @@ class AttributeException: public Exception {
132132// /
133133class DataSetException : public Exception {
134134 public:
135- DataSetException (const std::string& err_msg)
135+ explicit DataSetException (const std::string& err_msg)
136136 : Exception(err_msg) {}
137137};
138138
@@ -141,7 +141,7 @@ class DataSetException: public Exception {
141141// /
142142class GroupException : public Exception {
143143 public:
144- GroupException (const std::string& err_msg)
144+ explicit GroupException (const std::string& err_msg)
145145 : Exception(err_msg) {}
146146};
147147
@@ -150,7 +150,7 @@ class GroupException: public Exception {
150150// /
151151class PropertyException : public Exception {
152152 public:
153- PropertyException (const std::string& err_msg)
153+ explicit PropertyException (const std::string& err_msg)
154154 : Exception(err_msg) {}
155155};
156156
@@ -159,7 +159,7 @@ class PropertyException: public Exception {
159159// /
160160class ReferenceException : public Exception {
161161 public:
162- ReferenceException (const std::string& err_msg)
162+ explicit ReferenceException (const std::string& err_msg)
163163 : Exception(err_msg) {}
164164};
165165} // namespace HighFive
0 commit comments