1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 12:45:07 +00:00

Streams: Distinguish recoverable and fatal errors.

This commit is contained in:
asynts 2020-08-31 13:12:15 +02:00 committed by Andreas Kling
parent daeb2bdc60
commit 9ce4475907
9 changed files with 75 additions and 59 deletions

View file

@ -66,9 +66,9 @@ void LineProgram::parse_source_directories()
#endif
m_source_directories.append(move(directory));
}
m_stream.handle_error();
m_stream.handle_recoverable_error();
m_stream.discard_or_error(1);
ASSERT(!m_stream.handle_error());
ASSERT(!m_stream.has_any_error());
}
void LineProgram::parse_source_files()
@ -88,7 +88,7 @@ void LineProgram::parse_source_files()
m_source_files.append({ file_name, directory_index });
}
m_stream.discard_or_error(1);
ASSERT(!m_stream.handle_error());
ASSERT(!m_stream.has_any_error());
}
void LineProgram::append_to_line_info()