bevy/crates
Chris Russell bd4c960f26
Mention Option and When in the error message for a failing system parameter (#19490)
# Objective

Help users discover how to use `Option<T>` and `When<T>` to handle
failing parameters.

## Solution

Have the error message for a failed parameter mention that `Option<T>`
and `When<T>` can be used to handle the failure.

## Showcase

```
Encountered an error in system `system_name`: Parameter `Res<ResourceType>` failed validation: Resource does not exist
If this is an expected state, wrap the parameter in `Option<T>` and handle `None` when it happens, or wrap the parameter in `When<T>` to skip the system when it happens.
```
2025-06-04 16:39:54 +00:00
..
bevy_a11y Bump accesskit to 0.19 and accesskit_winit to 0.27 (#19160) 2025-05-26 17:48:36 +00:00
bevy_animation
bevy_anti_aliasing Make TAA non-experimental, fixes (#18349) 2025-06-02 16:04:08 +00:00
bevy_app Hot patching systems with subsecond (#19309) 2025-06-03 21:12:38 +00:00
bevy_asset Add get_mut_untracked to Assets (#19487) 2025-06-04 16:34:27 +00:00
bevy_audio Allow restricting audio playback to a custom region (#19400) 2025-05-29 18:45:37 +00:00
bevy_color More uninlined_format_args fixes (#19396) 2025-05-28 02:35:18 +00:00
bevy_core_pipeline Remove Shader weak_handles from bevy_core_pipeline (except two). (#19395) 2025-05-27 22:32:27 +00:00
bevy_derive deny(missing_docs) for bevy_derive (#19483) 2025-06-04 00:06:32 +00:00
bevy_dev_tools
bevy_diagnostic deny(missing_docs) for bevy_diagnostic (#19482) 2025-06-04 01:30:10 +00:00
bevy_dylib
bevy_ecs Mention Option and When in the error message for a failing system parameter (#19490) 2025-06-04 16:39:54 +00:00
bevy_encase_derive
bevy_gilrs refactor(utils): move SyncCell and SyncUnsafeCell to bevy_platform (#19305) 2025-05-27 04:57:26 +00:00
bevy_gizmos Remove Shader weak_handles from bevy_gizmos. (#19394) 2025-05-27 22:32:32 +00:00
bevy_gltf Allow returning an error from labeled_asset_scope. (#19449) 2025-06-04 00:00:32 +00:00
bevy_image Add resize_in_place to Image (#19410) 2025-05-31 21:55:11 +00:00
bevy_input
bevy_input_focus Navigate through TabGroups in order. (#19218) 2025-05-26 19:32:10 +00:00
bevy_internal Hot patching systems with subsecond (#19309) 2025-06-03 21:12:38 +00:00
bevy_log refactor(utils): move SyncCell and SyncUnsafeCell to bevy_platform (#19305) 2025-05-27 04:57:26 +00:00
bevy_macro_utils
bevy_math More uninlined_format_args fixes (#19396) 2025-05-28 02:35:18 +00:00
bevy_mesh
bevy_mikktspace
bevy_pbr Fixed memory leak in bindless material (#19041) 2025-05-30 19:36:56 +00:00
bevy_picking Updating mesh_picking doc to include RenderAssetUsages (#19413) 2025-05-29 18:44:50 +00:00
bevy_platform refactor(utils): move SyncCell and SyncUnsafeCell to bevy_platform (#19305) 2025-05-27 04:57:26 +00:00
bevy_ptr
bevy_reflect Clarify PartialReflect::apply docs (#19250) 2025-06-02 22:12:16 +00:00
bevy_remote Make sure that serde_json::Map::into_values exists (#19229) 2025-05-26 19:38:28 +00:00
bevy_render Make TAA non-experimental, fixes (#18349) 2025-06-02 16:04:08 +00:00
bevy_scene Fix #19219 by moving observer triggers out of resource_scope (#19221) 2025-05-30 19:33:47 +00:00
bevy_sprite Remove Shader weak_handles from bevy_sprite. (#19392) 2025-05-27 04:01:34 +00:00
bevy_state Refactor state scoped events to match entities. (#19435) 2025-05-31 20:14:14 +00:00
bevy_tasks
bevy_text Remove apostrophes in possessive its (#19244) 2025-05-26 19:53:14 +00:00
bevy_time Rename Timer::finished and Timer::paused to is_finished and is_paused (#19386) 2025-05-27 22:24:18 +00:00
bevy_transform
bevy_ui Unrequire VisibilityClass from Node (#17918) 2025-05-31 08:18:01 +00:00
bevy_utils fix reference in example usage comments (#19434) 2025-05-29 19:12:55 +00:00
bevy_window Allow unfocused window creation (#19237) 2025-05-26 20:05:33 +00:00
bevy_winit Allow unfocused window creation (#19237) 2025-05-26 20:05:33 +00:00