Improve error message on creation of interpreted environment
Signed-off-by: Olivier <olivier@librepush.net>
This commit is contained in:
parent
981812c796
commit
b7818dddc1
|
@ -72,12 +72,16 @@ pub fn new_template_manager(
|
||||||
|
|
||||||
successful.expect(&format!("Could not find Hornbeam templates/translations: tried looking in {try_paths:?} and no HORNBEAM_BASE environment variable set!"))
|
successful.expect(&format!("Could not find Hornbeam templates/translations: tried looking in {try_paths:?} and no HORNBEAM_BASE environment variable set!"))
|
||||||
};
|
};
|
||||||
let template_sys = load_new_template_system(
|
let template_sys = match load_new_template_system(
|
||||||
default_locale,
|
default_locale,
|
||||||
&base_dir.join("templates"),
|
&base_dir.join("templates"),
|
||||||
&base_dir.join("translations"),
|
&base_dir.join("translations"),
|
||||||
)
|
) {
|
||||||
.expect("Failed to create Hornbeam environment!");
|
Ok(v) => v,
|
||||||
|
Err(err) => {
|
||||||
|
panic!("Failed to create Hornbeam environment! {err}");
|
||||||
|
}
|
||||||
|
};
|
||||||
let templates = Arc::new(ArcSwap::new(Arc::new(template_sys)));
|
let templates = Arc::new(ArcSwap::new(Arc::new(template_sys)));
|
||||||
|
|
||||||
#[cfg(feature = "hot_reload")]
|
#[cfg(feature = "hot_reload")]
|
||||||
|
|
Loading…
Reference in New Issue