ZIm/crates/theme
Marshall Bowers 8e7cad7848
theme: Return structured errors when a theme is not found (#25090)
This PR updates the `ThemeRegistry` to return structured errors from the
`get` and `get_icon_theme` methods (which are used to retrieve themes
and icon themes, respectively).

We want to be able to carry the name of the theme that was not found as
state on the error, which is why we use a `Result` and not an `Option`.
However, we also want to be able to accurately identify when the error
case is "not found" so we can take appropriate action, based on the
circumstances.

By using a custom error type instead of an `anyhow::Error`, we get both.

There isn't any functional change in this PR. This just sets us up for
future improvements in this error.

Release Notes:

- N/A
2025-02-18 10:49:55 -05:00
..
src theme: Return structured errors when a theme is not found (#25090) 2025-02-18 10:49:55 -05:00
Cargo.toml theme: Return structured errors when a theme is not found (#25090) 2025-02-18 10:49:55 -05:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00