mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:37:44 +00:00
SystemMonitor: Propagate errors when trying to load an icon
This commit is contained in:
parent
d116b9a8c6
commit
4a0af3dc77
1 changed files with 4 additions and 4 deletions
|
@ -343,7 +343,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
};
|
};
|
||||||
|
|
||||||
auto kill_action = GUI::Action::create(
|
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);
|
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
return;
|
return;
|
||||||
|
@ -354,7 +354,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
&process_table_view);
|
&process_table_view);
|
||||||
|
|
||||||
auto stop_action = GUI::Action::create(
|
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);
|
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
return;
|
return;
|
||||||
|
@ -365,7 +365,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
&process_table_view);
|
&process_table_view);
|
||||||
|
|
||||||
auto continue_action = GUI::Action::create(
|
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);
|
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||||
if (pid != -1)
|
if (pid != -1)
|
||||||
kill(pid, SIGCONT);
|
kill(pid, SIGCONT);
|
||||||
|
@ -374,7 +374,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||||
|
|
||||||
auto profile_action = GUI::Action::create(
|
auto profile_action = GUI::Action::create(
|
||||||
"&Profile Process", { Mod_Ctrl, Key_P },
|
"&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);
|
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue