1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 02:13:56 +09:00

LibCore: Use ErrorOr<T> for Core::File::open()

This commit is contained in:
Andreas Kling 2021-11-07 02:15:10 +01:00
parent fac2550143
commit a7f1f1c34b
Notes: sideshowbarker 2024-07-18 08:59:31 +09:00
24 changed files with 42 additions and 48 deletions

View file

@ -177,9 +177,9 @@ void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, con
auto file_result = Core::File::open(url.path(), Core::OpenMode::ReadOnly);
if (file_result.is_error()) {
auto& error = file_result.error();
log_failure(request, error.string());
log_failure(request, error);
if (error_callback)
error_callback(error.string(), error.error());
error_callback(String::formatted("{}", error), error.code());
return;
}