From ca7f8869e9b8fceaaac67464beffd8b2d9b34f77 Mon Sep 17 00:00:00 2001 From: InioX Date: Wed, 20 Dec 2023 20:20:23 +0100 Subject: [PATCH] feat: add template name and path in error --- src/util/template.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/template.rs b/src/util/template.rs index 2ec896a..10b9191 100644 --- a/src/util/template.rs +++ b/src/util/template.rs @@ -214,7 +214,7 @@ impl Template { } let data = engine.template(name).render(upon::value!{ colors: &colors, image: image, custom: &custom, }).to_string().map_err(|error| { - let message = format!("{:#}", error); + let message = format!("[{} - {}]\n{:#}", name, input_path_absolute.display(), error); Report::new(error).wrap_err(message) })?;