Update parser.hpp #4037 Improve wording of parse_error exception done
This commit is contained in:
parent
5d2754306d
commit
9704c94cf2
@ -479,6 +479,10 @@ class parser
|
|||||||
error_msg += concat(m_lexer.get_error_message(), "; last read: '",
|
error_msg += concat(m_lexer.get_error_message(), "; last read: '",
|
||||||
m_lexer.get_token_string(), '\'');
|
m_lexer.get_token_string(), '\'');
|
||||||
}
|
}
|
||||||
|
else if (last_token == token_type::end_of_input && m_lexer.get_position().chars_read_total == 1)
|
||||||
|
{
|
||||||
|
error_msg += concat("Error attempting to parse an empty input, check that your input string or stream contains the expected JSON.");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
error_msg += concat("unexpected ", lexer_t::token_type_name(last_token));
|
error_msg += concat("unexpected ", lexer_t::token_type_name(last_token));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user