mirror of
https://github.com/SerenityOS/serenity.git
synced 2026-11-07 12:38:38 -10:00
Utilities: Use File.error_string() instead of perror(3) in cpp-*
This commit is contained in:
1 parent
d51072629d
commit
60a4da8e20
3 files changed
+3
-3
No files matched your search
@@ -19,7 +19,7 @@ int main(int argc, char** argv)
|
||||
args_parser.parse(argc, 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();
|
||||
|
||||
Reference in new issue
Block a user