![]() # Objective [see original comment](https://github.com/bevyengine/bevy/pull/18801#issuecomment-2796981745) > Alternately, could we store it on the World instead of a global? I think we have a World nearby whenever we call default_error_handler(). That would avoid the need for atomics or locks, since we could do ordinary reads and writes to the World. Global error handlers don't actually need to be global – per world is enough. This allows using different handlers for different worlds and also removes the restrictions on changing the handler only once. ## Solution Each `World` can now store its own error handler in a resource. For convenience, you can also set the default error handler for an `App`, which applies it to the worlds of all `SubApp`s. The old behavior of only being able to set the error handler once is kept for apps. We also don't need the `configurable_error_handler` feature anymore now. ## Testing New/adjusted tests for failing schedule systems & observers. --- ## Showcase ```rust App::new() .set_error_handler(info) … ``` |
||
---|---|---|
.. | ||
change_detection.rs | ||
component_hooks.rs | ||
custom_query_param.rs | ||
custom_schedule.rs | ||
dynamic.rs | ||
ecs_guide.rs | ||
entity_disabling.rs | ||
error_handling.rs | ||
event.rs | ||
fallible_params.rs | ||
fixed_timestep.rs | ||
generic_system.rs | ||
hierarchy.rs | ||
immutable_components.rs | ||
iter_combinations.rs | ||
nondeterministic_system_order.rs | ||
observer_propagation.rs | ||
observers.rs | ||
one_shot_systems.rs | ||
parallel_query.rs | ||
relationships.rs | ||
removal_detection.rs | ||
run_conditions.rs | ||
send_and_receive_events.rs | ||
startup_system.rs | ||
state_scoped.rs | ||
system_closure.rs | ||
system_param.rs | ||
system_piping.rs | ||
system_stepping.rs |