mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:07:34 +00:00
LibCore+Userland: Make Promise's on_resolve fallible
This will be primarily necessary for BackgroundAction integration, but it already allows us to add proper error handling in LibIMAP :^)
This commit is contained in:
parent
dc318d3080
commit
8f4d0d3797
5 changed files with 24 additions and 20 deletions
|
@ -571,10 +571,10 @@ void CookieJar::select_all_cookies_from_database(OnSelectAllCookiesResult on_res
|
|||
on_result(cookie.release_value());
|
||||
},
|
||||
[&]() {
|
||||
promise->resolve({});
|
||||
MUST(promise->resolve({}));
|
||||
},
|
||||
[&](auto) {
|
||||
promise->resolve({});
|
||||
MUST(promise->resolve({}));
|
||||
});
|
||||
|
||||
MUST(promise->await());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue