diff --git a/common/assets/src/lib.rs b/common/assets/src/lib.rs index 886670a11a..bed643fc77 100644 --- a/common/assets/src/lib.rs +++ b/common/assets/src/lib.rs @@ -96,7 +96,8 @@ pub fn load_dir( #[track_caller] pub fn load_expect_dir(specifier: &str, recursive: bool) -> AssetDirHandle { - load_dir(specifier, recursive).expect("Failed loading directory") + load_dir(specifier, recursive) + .unwrap_or_else(|e| panic!("Failed loading directory. error={:?}", e)) } impl AssetExt for T {