-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Description
Creating a file stream for file that doesn't exist results in stream object whose fail() method returns true. json::parse never returns when called on such a stream. Adding a check for m_stream.fail() (in addition to eof()) in fill_line_buffer seems to do the trick, invalid_argument exception gets thrown. Not sure if this is the right fix, it might also make sense checking that stream isn't 'bad' (not sure what causes this to happen as bad() for missing file stream returns false).
Reactions are currently unavailable