1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-12 09:21:42 +03:00

Merge branch 'develop' into feature/issue365

This commit is contained in:
Niels Lohmann
2016-11-26 12:45:50 +01:00
4 changed files with 35 additions and 0 deletions

View File

@ -7597,6 +7597,12 @@ class basic_json
explicit lexer(std::istream& s)
: m_stream(&s), m_line_buffer()
{
// immediately abort if stream is erroneous
if (s.fail())
{
throw std::invalid_argument("stream error: " + std::string(strerror(errno)));
}
// fill buffer
fill_line_buffer();