More detailed errors when resource not found (#1864)
Fixes #1846 Got scared of the other "Requested resource does not exist" error at line 395 in `system_param.rs`, under `impl<'a, T: Component> SystemParamFetch<'a> for ResMutState<T> {`. Someone with better knowledge of the code might be able to go in and improve that one.
This commit is contained in:
parent
8aa22ba477
commit
c86d490a20
@ -242,7 +242,8 @@ impl<'a, T: Component> SystemParamFetch<'a> for ResState<T> {
|
|||||||
.get_populated_resource_column(state.component_id)
|
.get_populated_resource_column(state.component_id)
|
||||||
.unwrap_or_else(|| {
|
.unwrap_or_else(|| {
|
||||||
panic!(
|
panic!(
|
||||||
"Requested resource does not exist: {}",
|
"Resource requested by {} does not exist: {}",
|
||||||
|
system_state.name,
|
||||||
std::any::type_name::<T>()
|
std::any::type_name::<T>()
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user