summaryrefslogtreecommitdiff
path: root/Userland/Utilities/cpp-lexer.cpp
diff options
context:
space:
mode:
authorRalf Donau <ruelle@volleyballschlaeger.de>2021-08-21 23:10:59 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-22 02:01:58 +0200
commit60a4da8e204223d09c55cee0d4e9a586ecd95982 (patch)
treeed6368c6a2a07e11f85824cb3d14e63b9b3a2ac4 /Userland/Utilities/cpp-lexer.cpp
parentd51072629d89a5c49b05533021969a0a1b96c0e5 (diff)
downloadserenity-60a4da8e204223d09c55cee0d4e9a586ecd95982.zip
Utilities: Use File.error_string() instead of perror(3) in cpp-*
Diffstat (limited to 'Userland/Utilities/cpp-lexer.cpp')
-rw-r--r--Userland/Utilities/cpp-lexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Utilities/cpp-lexer.cpp b/Userland/Utilities/cpp-lexer.cpp
index 4b713f6217..528f231405 100644
--- a/Userland/Utilities/cpp-lexer.cpp
+++ b/Userland/Utilities/cpp-lexer.cpp
@@ -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();