! @brief create a parse error exception @param[in] id_ the id of the exception @param[in] byte_ the byte index where the error occurred (or 0 if the position cannot be determined) @param[in] what_arg the explanatory string @return parse_error object */
| 277 | @return parse_error object |
| 278 | */ |
| 279 | static parse_error create(int id_, std::size_t byte_, const std::string& what_arg) |
| 280 | { |
| 281 | std::string w = exception::name("parse_error", id_) + "parse error" + |
| 282 | (byte_ != 0 ? (" at " + std::to_string(byte_)) : "") + |
| 283 | ": " + what_arg; |
| 284 | return parse_error(id_, byte_, w.c_str()); |
| 285 | } |
| 286 | |
| 287 | /*! |
| 288 | @brief byte index of the parse error |
nothing calls this directly
no test coverage detected