bevy/crates/bevy_render/src/render_phase
SpecificProtagonist 5e6b141c13
List components for QueryEntityError::QueryDoesNotMatch (#15435)
# Objective

Make it easier to debug why an entity doesn't match a query.

## Solution

List the entities components in `QueryEntityError::QueryDoesNotMatch`'s
message, e.g. `The query does not match the entity 0v1, which has
components foo::Bar, foo::Baz`.
This covers most cases as expected components are typically known and
filtering for change detection is rare when assessing a query by entity
id.

## Testing

Added a test confirming the new message matches the entity's components.

## Migration Guide

- `QueryEntityError` now has a lifetime. Convert it to a custom error if
you need to store it.

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: poopy <gonesbird@gmail.com>
2024-09-26 13:31:11 +00:00
..
draw_state.rs TrackedRenderPass internal tracking state reset (#14948) 2024-09-12 16:51:36 +00:00
draw.rs List components for QueryEntityError::QueryDoesNotMatch (#15435) 2024-09-26 13:31:11 +00:00
mod.rs Don't ignore draw errors (#13240) 2024-07-22 19:22:30 +00:00
rangefinder.rs Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00