mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Show errors loading individual files during glob asset loading
This commit is contained in:
parent
831d7c77a6
commit
4652ae2f03
@ -116,7 +116,16 @@ pub fn load_glob<A: Asset + 'static>(specifier: &str) -> Result<Arc<Vec<Arc<A>>>
|
||||
let assets = Arc::new(
|
||||
glob_matches
|
||||
.into_iter()
|
||||
.filter_map(|name| load(&specifier.replace("*", &name)).ok())
|
||||
.filter_map(|name| {
|
||||
load(&specifier.replace("*", &name))
|
||||
.map_err(|e| {
|
||||
error!(
|
||||
"Failed to load \"{}\" as part of glob \"{}\" with error: {:?}",
|
||||
name, specifier, e
|
||||
)
|
||||
})
|
||||
.ok()
|
||||
})
|
||||
.collect::<Vec<_>>(),
|
||||
);
|
||||
let clone = Arc::clone(&assets);
|
||||
|
Loading…
Reference in New Issue
Block a user