@@ -90,21 +90,8 @@ class Error : public Exception
9090
9191public:
9292
93- /* *
94- * @brief Construct a new statistics_backend::Error exception
95- *
96- * @param message The message to be returned by what()
97- */
98- FASTDDS_STATISTICS_BACKEND_DllAPI Error (
99- const char * message) noexcept ;
100-
101- /* *
102- * @brief Construct a new statistics_backend::Error exception
103- *
104- * @param message The message to be returned by what()
105- */
106- FASTDDS_STATISTICS_BACKEND_DllAPI Error (
107- const std::string& message);
93+ // Use parent constructors.
94+ using Exception::Exception;
10895
10996 /* *
11097 * @brief Copies the statistics_backend::Error exception into a new one
@@ -132,21 +119,8 @@ class Unsupported : public Exception
132119
133120public:
134121
135- /* *
136- * @brief Construct a new statistics_backend::Unsupported exception
137- *
138- * @param message The message to be returned by what()
139- */
140- FASTDDS_STATISTICS_BACKEND_DllAPI Unsupported (
141- const char * message) noexcept ;
142-
143- /* *
144- * @brief Construct a new statistics_backend::Unsupported exception
145- *
146- * @param message The message to be returned by what()
147- */
148- FASTDDS_STATISTICS_BACKEND_DllAPI Unsupported (
149- const std::string& message);
122+ // Use parent constructors.
123+ using Exception::Exception;
150124
151125 /* *
152126 * @brief Copies the statistics_backend::Unsupported exception into a new one
@@ -174,21 +148,8 @@ class BadParameter : public Exception
174148
175149public:
176150
177- /* *
178- * @brief Construct a new statistics_backend::BadParameter exception
179- *
180- * @param message The message to be returned by what()
181- */
182- FASTDDS_STATISTICS_BACKEND_DllAPI BadParameter (
183- const char * message) noexcept ;
184-
185- /* *
186- * @brief Construct a new statistics_backend::BadParameter exception
187- *
188- * @param message The message to be returned by what()
189- */
190- FASTDDS_STATISTICS_BACKEND_DllAPI BadParameter (
191- const std::string& message);
151+ // Use parent constructors.
152+ using Exception::Exception;
192153
193154 /* *
194155 * @brief Copies the statistics_backend::BadParameter exception into a new one
@@ -216,21 +177,8 @@ class PreconditionNotMet : public Exception
216177
217178public:
218179
219- /* *
220- * @brief Construct a new statistics_backend::PreconditionNotMet exception
221- *
222- * @param message The message to be returned by what()
223- */
224- FASTDDS_STATISTICS_BACKEND_DllAPI PreconditionNotMet (
225- const char * message) noexcept ;
226-
227- /* *
228- * @brief Construct a new statistics_backend::PreconditionNotMet exception
229- *
230- * @param message The message to be returned by what()
231- */
232- FASTDDS_STATISTICS_BACKEND_DllAPI PreconditionNotMet (
233- const std::string& message);
180+ // Use parent constructors.
181+ using Exception::Exception;
234182
235183 /* *
236184 * @brief Copies the statistics_backend::PreconditionNotMet exception into a new one
@@ -258,21 +206,8 @@ class CorruptedFile : public Exception
258206
259207public:
260208
261- /* *
262- * @brief Construct a new statistics_backend::CorruptedFile exception
263- *
264- * @param message The message to be returned by what()
265- */
266- FASTDDS_STATISTICS_BACKEND_DllAPI CorruptedFile (
267- const char * message) noexcept ;
268-
269- /* *
270- * @brief Construct a new statistics_backend::CorruptedFile exception
271- *
272- * @param message The message to be returned by what()
273- */
274- FASTDDS_STATISTICS_BACKEND_DllAPI CorruptedFile (
275- const std::string& message);
209+ // Use parent constructors.
210+ using Exception::Exception;
276211
277212 /* *
278213 * @brief Copies the statistics_backend::CorruptedFile exception into a new one
@@ -292,9 +227,36 @@ class CorruptedFile : public Exception
292227 const CorruptedFile& other) = default ;
293228};
294229
230+ /* *
231+ * @brief Exception to signal that an inconsistency inside the database has been found.
232+ */
233+ class Inconsistency : public Exception
234+ {
235+
236+ public:
237+
238+ // Use parent constructors.
239+ using Exception::Exception;
240+
241+ /* *
242+ * @brief Copies the statistics_backend::Inconsistency exception into a new one
243+ *
244+ * @param other The original exception object to copy
245+ */
246+ FASTDDS_STATISTICS_BACKEND_DllAPI Inconsistency (
247+ const Inconsistency& other) = default;
248+
249+ /* *
250+ * @brief Copies the statistics_backend::Inconsistency exception into the current one
251+ *
252+ * @param other The original statistics_backend::Inconsistency exception to copy
253+ * @return the current statistics_backend::Inconsistency exception after the copy
254+ */
255+ FASTDDS_STATISTICS_BACKEND_DllAPI Inconsistency& operator =(
256+ const Inconsistency& other) = default ;
257+ };
258+
295259} // namespace statistics_backend
296260} // namespace eprosima
297261
298-
299262#endif // _EPROSIMA_FASTDDS_STATISTICS_BACKEND_EXCEPTION_EXCEPTION_HPP_
300-
0 commit comments