Userland: Propagate errors with TRY() where possible

This commit is contained in:
Tim Ledbetter 2024-02-07 20:43:43 +00:00 committed by Tim Flynn
commit 2331d2bafa
Notes: sideshowbarker 2024-07-17 17:49:11 +09:00
6 changed files with 20 additions and 20 deletions

View file

@ -172,12 +172,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
update_source_model();
};
auto disassembly_action = GUI::Action::create_checkable("Show &Disassembly", { Mod_Ctrl, Key_D }, Gfx::Bitmap::load_from_file("/res/icons/16x16/x86.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto& action) {
auto disassembly_action = GUI::Action::create_checkable("Show &Disassembly", { Mod_Ctrl, Key_D }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/x86.png"sv)), [&](auto& action) {
disassembly_view.set_visible(action.is_checked());
update_disassembly_model();
});
auto source_action = GUI::Action::create_checkable("Show &Source", { Mod_Ctrl, Key_S }, Gfx::Bitmap::load_from_file("/res/icons/16x16/x86.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto& action) {
auto source_action = GUI::Action::create_checkable("Show &Source", { Mod_Ctrl, Key_S }, TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/x86.png"sv)), [&](auto& action) {
source_view.set_visible(action.is_checked());
update_source_model();
});