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:
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user