diff options
author | Keir Davis <minecraftfun201@gmail.com> | 2022-12-16 13:51:43 +0000 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2022-12-17 19:20:21 +0000 |
commit | 4a0af3dc77aadb6c0580132fbd6d812de2840f43 (patch) | |
tree | 38f68c95777571ded810651665f00b1205c86efb /Userland/Applications | |
parent | d116b9a8c659b618d21508b01456e14059142f38 (diff) | |
download | serenity-4a0af3dc77aadb6c0580132fbd6d812de2840f43.zip |
SystemMonitor: Propagate errors when trying to load an icon
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/SystemMonitor/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Applications/SystemMonitor/main.cpp b/Userland/Applications/SystemMonitor/main.cpp index 64b9febe97..8f39f5a2f7 100644 --- a/Userland/Applications/SystemMonitor/main.cpp +++ b/Userland/Applications/SystemMonitor/main.cpp @@ -343,7 +343,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) }; auto kill_action = GUI::Action::create( - "&Kill Process", { Mod_Ctrl, Key_K }, { Key_Delete }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/kill.png"sv).release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) { + "&Kill Process", { Mod_Ctrl, Key_K }, { Key_Delete }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/kill.png"sv)), [&](const GUI::Action&) { pid_t pid = selected_id(ProcessModel::Column::PID); if (pid == -1) return; @@ -354,7 +354,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) &process_table_view); auto stop_action = GUI::Action::create( - "&Stop Process", { Mod_Ctrl, Key_S }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/stop-hand.png"sv).release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) { + "&Stop Process", { Mod_Ctrl, Key_S }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/stop-hand.png"sv)), [&](const GUI::Action&) { pid_t pid = selected_id(ProcessModel::Column::PID); if (pid == -1) return; @@ -365,7 +365,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) &process_table_view); auto continue_action = GUI::Action::create( - "&Continue Process", { Mod_Ctrl, Key_C }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/continue.png"sv).release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) { + "&Continue Process", { Mod_Ctrl, Key_C }, TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/continue.png"sv)), [&](const GUI::Action&) { pid_t pid = selected_id(ProcessModel::Column::PID); if (pid != -1) kill(pid, SIGCONT); @@ -374,7 +374,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) auto profile_action = GUI::Action::create( "&Profile Process", { Mod_Ctrl, Key_P }, - Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-profiler.png"sv).release_value_but_fixme_should_propagate_errors(), [&](auto&) { + TRY(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-profiler.png"sv)), [&](auto&) { pid_t pid = selected_id(ProcessModel::Column::PID); if (pid == -1) return; |