mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
Userland: Propagate errors with TRY()
where possible
This commit is contained in:
parent
3ffa2a39bc
commit
2331d2bafa
Notes:
sideshowbarker
2024-07-17 17:49:11 +09:00
Author: https://github.com/tcl3
Commit: 2331d2bafa
Pull-request: https://github.com/SerenityOS/serenity/pull/23114
Reviewed-by: https://github.com/trflynn89
6 changed files with 20 additions and 20 deletions
|
@ -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();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue