mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:27:35 +00:00
LibCore: Make Core::File::open() return OSError in case of failure
This commit is contained in:
parent
1474a537b6
commit
13f4890c38
8 changed files with 15 additions and 15 deletions
|
@ -13,7 +13,7 @@ TEST_CASE(file_readline)
|
|||
auto path = "long_lines.txt";
|
||||
auto file_or_error = Core::File::open(path, Core::OpenMode::ReadOnly);
|
||||
if (file_or_error.is_error()) {
|
||||
warnln("Failed to open {}: {}", path, strerror(errno));
|
||||
warnln("Failed to open {}: {}", path, file_or_error.error());
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
auto file = file_or_error.release_value();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue