1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:07:34 +00:00

LibCore: Propagate errors from Stream::*_entire_buffer

This commit is contained in:
Tim Schumacher 2022-12-11 19:21:36 +01:00 committed by Andreas Kling
parent 6c7c5a6786
commit 9a3e95785e
17 changed files with 43 additions and 49 deletions

View file

@ -161,7 +161,7 @@ public:
}
for (DeprecatedString const& line : lines) {
if (!m_output->write_entire_buffer(DeprecatedString::formatted("{}\n", line).bytes()))
if (m_output->write_entire_buffer(DeprecatedString::formatted("{}\n", line).bytes()).is_error())
break;
}
@ -427,7 +427,7 @@ void write_per_file(HashMap<size_t, TestResult> const& result_map, Vector<Deprec
complete_results.set("duration", time_taken_in_ms / 1000.);
complete_results.set("results", result_object);
if (!file->write_entire_buffer(complete_results.to_deprecated_string().bytes()))
if (file->write_entire_buffer(complete_results.to_deprecated_string().bytes()).is_error())
warnln("Failed to write per-file");
file->close();
}