mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
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
1 changed files with 2 additions and 1 deletions
|
@ -242,7 +242,8 @@ impl<'a, T: Component> SystemParamFetch<'a> for ResState<T> {
|
|||
.get_populated_resource_column(state.component_id)
|
||||
.unwrap_or_else(|| {
|
||||
panic!(
|
||||
"Requested resource does not exist: {}",
|
||||
"Resource requested by {} does not exist: {}",
|
||||
system_state.name,
|
||||
std::any::type_name::<T>()
|
||||
)
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue