2025-11-04 13:28:06 +01:00
|
|
|
#ifndef CONFIG_EXCEPTION_H
|
|
|
|
|
#define CONFIG_EXCEPTION_H
|
|
|
|
|
|
|
|
|
|
#include <interfaces/toml.h>
|
|
|
|
|
|
2026-01-16 11:40:02 +01:00
|
|
|
/// The TOML parser namespace
|
|
|
|
|
namespace toml_parser
|
2025-11-04 13:28:06 +01:00
|
|
|
{
|
|
|
|
|
/**
|
2026-01-16 11:40:02 +01:00
|
|
|
* @brief Extended exception for the TOML parser.
|
2025-11-04 13:28:06 +01:00
|
|
|
*/
|
2026-01-16 11:40:02 +01:00
|
|
|
except XTOMLParseException : public sdv::toml::XTOMLParseException
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @brief Constructor
|
|
|
|
|
*/
|
|
|
|
|
XTOMLParseException(const std::string& rss)
|
|
|
|
|
{
|
|
|
|
|
ssMessage = rss;
|
|
|
|
|
};
|
2025-11-04 13:28:06 +01:00
|
|
|
|
2026-01-16 11:40:02 +01:00
|
|
|
/**
|
|
|
|
|
* @brief Return the explanatory string.
|
|
|
|
|
* @return The descriptive string.
|
|
|
|
|
*/
|
|
|
|
|
virtual const char* what() const noexcept override
|
|
|
|
|
{
|
|
|
|
|
return ssMessage.c_str();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
} // namespace toml_parser
|
2025-11-04 13:28:06 +01:00
|
|
|
|
|
|
|
|
#endif // !defined CONFIG_EXCEPTION_H
|