1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-13 20:21:48 +03:00

more tests for exceptions (#160)

This commit is contained in:
Niels
2015-12-25 13:04:40 +01:00
parent 76e5e29eda
commit dc8ab92552
3 changed files with 229 additions and 90 deletions

View File

@ -6371,7 +6371,8 @@ class basic_json
@param[in] codepoint1 the code point (can be high surrogate)
@param[in] codepoint2 the code point (can be low surrogate or 0)
@return string representation of the code point
@throw std::out_of_range if code point is >0x10ffff
@throw std::out_of_range if code point is >0x10ffff; example: `"code
points above 0x10FFFF are invalid"`
@throw std::invalid_argument if the low surrogate is invalid
@see <http://en.wikipedia.org/wiki/UTF-8#Sample_code>
@ -7765,8 +7766,7 @@ basic_json_parser_64:
{
std::string error_msg = "parse error - unexpected \'";
error_msg += m_lexer.get_token();
error_msg += "\' (";
error_msg += lexer::token_type_name(last_token) + ")";
error_msg += "\'";
throw std::invalid_argument(error_msg);
}
}