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:
parent
fac2550143
commit
a7f1f1c34b
Notes:
sideshowbarker
2024-07-18 08:59:31 +09:00
Author: https://github.com/awesomekling
Commit: a7f1f1c34b
24 changed files with 42 additions and 48 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue