@brief An exception class indicating an error in parsing. @sa https://fktn-k.github.io/fkYAML/api/exception/parse_error/
| 1734 | /// @brief An exception class indicating an error in parsing. |
| 1735 | /// @sa https://fktn-k.github.io/fkYAML/api/exception/parse_error/ |
| 1736 | class parse_error : public exception { |
| 1737 | public: |
| 1738 | /// @brief Constructs a new parse_error object with an error message and counts of lines and colums at the error. |
| 1739 | /// @param[in] msg An error message. |
| 1740 | /// @param[in] lines Count of lines. |
| 1741 | /// @param[in] cols_in_line Count of colums. |
| 1742 | explicit parse_error(const char* msg, uint32_t lines, uint32_t cols_in_line) noexcept |
| 1743 | : exception(generate_error_message(msg, lines, cols_in_line).c_str()) { |
| 1744 | } |
| 1745 | |
| 1746 | private: |
| 1747 | static std::string generate_error_message(const char* msg, uint32_t lines, uint32_t cols_in_line) noexcept { |
| 1748 | return detail::format("parse_error: %s (at line %u, column %u)", msg, lines, cols_in_line); |
| 1749 | } |
| 1750 | }; |
| 1751 | |
| 1752 | /// @brief An exception class indicating an invalid type conversion. |
| 1753 | /// @sa https://fktn-k.github.io/fkYAML/api/exception/type_error/ |
no outgoing calls
no test coverage detected