-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - More detailed errors when resource not found #1864
Conversation
I believe you can make the |
@@ -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: {}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of "Resource {} does not exist, but was requested by {}"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think as written it flows a bit more naturally.
bors r+ |
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.
Pull request successfully merged into main. Build succeeded: |
@therealstork please respond in #2373 for the relicense to MIT/Apache 2.0. Thanks! |
Fixes bevyengine#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.
…evyengine#1986) Some panic messages for systems include the system name, but there's a few panic messages which do not. This PR adds the system name for the remaining panic messages. This is a continuation of the work done in bevyengine#1864. Related: bevyengine#1846
Fixes #1846
Got scared of the other "Requested resource does not exist" error at line 395 in
system_param.rs
, underimpl<'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.