1
Fork 0
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:
kleines Filmröllchen 2022-12-29 14:53:47 +01:00 committed by Linus Groh
parent dc318d3080
commit 8f4d0d3797
5 changed files with 24 additions and 20 deletions

View file

@ -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());