mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +00:00
LibGfx+Userland: Make Gfx::SystemTheme propagate errors
This patch introduces error propagation to Gfx::SystemTheme to remove instances of release_value_but_fixme_should_propagate_errors(). Userland applications that have been affected by this change have been updated to utilise this propagation and as a result 4 such instances of the aforementioned method have been removed.
This commit is contained in:
parent
bdd9bc16de
commit
806a55eda1
15 changed files with 64 additions and 39 deletions
|
@ -56,8 +56,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window, path.value());
|
||||
if (response.is_error())
|
||||
GUI::MessageBox::show_error(window, DeprecatedString::formatted("Opening \"{}\" failed: {}", path.value(), response.error()));
|
||||
else
|
||||
main_widget->load_from_file(response.release_value());
|
||||
else {
|
||||
auto load_from_file_result = main_widget->load_from_file(response.release_value());
|
||||
if (load_from_file_result.is_error())
|
||||
GUI::MessageBox::show_error(window, DeprecatedString::formatted("Loading theme from file has failed: {}", load_from_file_result.error()));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue