Skip to content

Commit

Permalink
fix: make error message not so confusing
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloxaf committed Nov 4, 2020
1 parent 07b5e05 commit 34eb926
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::formatter::{ImageFormatter, ImageFormatterBuilder};
use crate::utils::{Background, ShadowAdder, ToRgba};
use anyhow::Error;
use anyhow::{Context, Error};
use clipboard::{ClipboardContext, ClipboardProvider};
use image::Rgba;
use std::fs::File;
Expand Down Expand Up @@ -216,7 +216,8 @@ impl Config {
if let Some(theme) = ts.themes.get(&self.theme) {
Ok(theme.clone())
} else {
Ok(ThemeSet::get_theme(&self.theme)?)
ThemeSet::get_theme(&self.theme)
.context(format!("Canot load the theme: {}", self.theme))
}
}

Expand Down

0 comments on commit 34eb926

Please sign in to comment.