Skip to content

Commit

Permalink
print theme loading errors into log (#2056)
Browse files Browse the repository at this point in the history
  • Loading branch information
extrawurst committed Feb 19, 2024
1 parent acf4661 commit be10d90
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ui/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,13 @@ impl Theme {
fn load_patch(theme_path: &PathBuf) -> Result<ThemePatch> {
let file = File::open(theme_path)?;

Ok(ron::de::from_reader(file)?)
let load_result = ron::de::from_reader(file);

if let Err(e) = &load_result {
log::error!("theme loading error: {e}");
}

Ok(load_result?)
}

fn load_old_theme(theme_path: &PathBuf) -> Result<Self> {
Expand Down

0 comments on commit be10d90

Please sign in to comment.