AK: Eradicate calls to warn().

This commit is contained in:
asynts 2020-10-25 17:46:16 +01:00 committed by Andreas Kling
commit 1254cbbd0b
Notes: sideshowbarker 2024-07-19 01:43:46 +09:00
9 changed files with 42 additions and 53 deletions

View file

@ -65,13 +65,13 @@ int main()
auto file_or_error = Core::File::open("/var/run/utmp", Core::IODevice::ReadOnly);
if (file_or_error.is_error()) {
warn() << "Error: " << file_or_error.error();
warnln("Error: {}", file_or_error.error());
return 1;
}
auto& file = *file_or_error.value();
auto json = JsonValue::from_string(file.read_all());
if (!json.has_value() || !json.value().is_object()) {
warn() << "Error: Could not parse /var/run/utmp";
warnln("Error: Could not parse /var/run/utmp");
return 1;
}