🔨 added error messages to SAX interface

This commit is contained in:
Niels Lohmann 2018-03-05 16:46:35 +01:00
parent 86991d5204
commit 9d27429527
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
5 changed files with 57 additions and 29 deletions

View file

@ -113,9 +113,12 @@ struct json_sax
@brief a parse error occurred
@param[in] position the position in the input where the error occurs
@param[in] last_token the last read token
@param[in] error_msg a detailed error message
@return whether parsing should proceed
*/
virtual bool parse_error(std::size_t position, const std::string& last_token) = 0;
virtual bool parse_error(std::size_t position,
const std::string& last_token,
const std::string& error_msg) = 0;
virtual ~json_sax() = default;
};