diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-02-06 13:33:42 +0000 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2022-02-16 19:49:41 -0500 |
commit | 8260135d4d6cc50d15b459feb6010a989fcb7f5b (patch) | |
tree | 8211a9b8b29b749270c6d71f4faf6073e1a382cb /Userland/Applications/ThemeEditor | |
parent | 1a4dd47d5f691f77f5a11dbb5cdd8d58b2336245 (diff) | |
download | serenity-8260135d4d6cc50d15b459feb6010a989fcb7f5b.zip |
LibCore+Everywhere: Return ErrorOr from ConfigFile factory methods
I've attempted to handle the errors gracefully where it was clear how to
do so, and simple, but a lot of this was just adding
`release_value_but_fixme_should_propagate_errors()` in places.
Diffstat (limited to 'Userland/Applications/ThemeEditor')
-rw-r--r-- | Userland/Applications/ThemeEditor/PreviewWidget.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/ThemeEditor/main.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/ThemeEditor/PreviewWidget.cpp b/Userland/Applications/ThemeEditor/PreviewWidget.cpp index 49ae0f3114..0c23c73ae1 100644 --- a/Userland/Applications/ThemeEditor/PreviewWidget.cpp +++ b/Userland/Applications/ThemeEditor/PreviewWidget.cpp @@ -141,7 +141,7 @@ void PreviewWidget::set_preview_palette(const Gfx::Palette& palette) void PreviewWidget::set_theme_from_file(Core::File& file) { - auto config_file = Core::ConfigFile::open(file.filename(), file.leak_fd()); + auto config_file = Core::ConfigFile::open(file.filename(), file.leak_fd()).release_value_but_fixme_should_propagate_errors(); auto theme = Gfx::load_system_theme(config_file); VERIFY(theme.is_valid()); diff --git a/Userland/Applications/ThemeEditor/main.cpp b/Userland/Applications/ThemeEditor/main.cpp index 6c5e9de3ab..77bc9fb4ef 100644 --- a/Userland/Applications/ThemeEditor/main.cpp +++ b/Userland/Applications/ThemeEditor/main.cpp @@ -357,7 +357,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) update_window_title(); auto file = response.value(); - auto theme = Core::ConfigFile::open(file->filename(), file->leak_fd()); + auto theme = Core::ConfigFile::open(file->filename(), file->leak_fd()).release_value_but_fixme_should_propagate_errors(); for (auto role : color_roles) { theme->write_entry("Colors", to_string(role), preview_widget.preview_palette().color(role).to_string()); } |