Skip to content

Commit f6269c2

Browse files
committed
Print inner error on theme validation.
1 parent a06ff0d commit f6269c2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,11 @@ fn validate_themes(root_path: &str, valid_themes_filename: &str) -> Result<()> {
10941094
&empty_site,
10951095
Section::<PostSectionFilter>::from_resource(&get_default_index("index"), &empty_site)?,
10961096
) {
1097-
log::warn!("Failed to render theme {}: {}", theme, e);
1097+
let mut error_str = format!("{}", e);
1098+
if let Some(source) = e.into_inner().source() {
1099+
error_str = format!("{} Caused by: {}", error_str, source);
1100+
}
1101+
log::warn!("Failed to render theme {}: {}", theme, error_str);
10981102
continue;
10991103
}
11001104

0 commit comments

Comments
 (0)