1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 07:54:58 +00:00

Utilities: Use File.error_string() instead of perror(3) in cpp-*

This commit is contained in:
Ralf Donau 2021-08-21 23:10:59 +02:00 committed by Andreas Kling
parent d51072629d
commit 60a4da8e20
3 changed files with 3 additions and 3 deletions

View file

@ -17,7 +17,7 @@ int main(int argc, char** argv)
auto file = Core::File::construct(path);
if (!file->open(Core::OpenMode::ReadOnly)) {
perror("open");
warnln("Failed to open {}: {}", path, file->error_string());
exit(1);
}
auto content = file->read_all();