mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Better error signaling in assets::load_dir_expect
This commit is contained in:
parent
a3bf073875
commit
d92d54f8ad
@ -96,7 +96,8 @@ pub fn load_dir<T: DirLoadable>(
|
||||
|
||||
#[track_caller]
|
||||
pub fn load_expect_dir<T: DirLoadable>(specifier: &str, recursive: bool) -> AssetDirHandle<T> {
|
||||
load_dir(specifier, recursive).expect("Failed loading directory")
|
||||
load_dir(specifier, recursive)
|
||||
.unwrap_or_else(|e| panic!("Failed loading directory. error={:?}", e))
|
||||
}
|
||||
|
||||
impl<T: Compound> AssetExt for T {
|
||||
|
Loading…
Reference in New Issue
Block a user