From b5439f56ee815b642cde3ae4ca8f982d2dc28154 Mon Sep 17 00:00:00 2001 From: Chris Russell <8494645+chescock@users.noreply.github.com> Date: Wed, 9 Jul 2025 09:28:36 -0400 Subject: [PATCH] Use `ErrorContext::RunCondition` variant when reporting errors from run conditions. --- crates/bevy_ecs/src/schedule/executor/multi_threaded.rs | 2 +- crates/bevy_ecs/src/schedule/executor/simple.rs | 2 +- crates/bevy_ecs/src/schedule/executor/single_threaded.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs index 006faa8fe4..146ef05c7a 100644 --- a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs @@ -849,7 +849,7 @@ unsafe fn evaluate_and_fold_conditions( if let RunSystemError::Failed(err) = err { error_handler( err, - ErrorContext::System { + ErrorContext::RunCondition { name: condition.name(), last_run: condition.get_last_run(), }, diff --git a/crates/bevy_ecs/src/schedule/executor/simple.rs b/crates/bevy_ecs/src/schedule/executor/simple.rs index 17f3f3b8a0..d7ecdee22c 100644 --- a/crates/bevy_ecs/src/schedule/executor/simple.rs +++ b/crates/bevy_ecs/src/schedule/executor/simple.rs @@ -207,7 +207,7 @@ fn evaluate_and_fold_conditions( if let RunSystemError::Failed(err) = err { error_handler( err, - ErrorContext::System { + ErrorContext::RunCondition { name: condition.name(), last_run: condition.get_last_run(), }, diff --git a/crates/bevy_ecs/src/schedule/executor/single_threaded.rs b/crates/bevy_ecs/src/schedule/executor/single_threaded.rs index 4d321bdaff..6fae587fd4 100644 --- a/crates/bevy_ecs/src/schedule/executor/single_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/single_threaded.rs @@ -223,7 +223,7 @@ fn evaluate_and_fold_conditions( if let RunSystemError::Failed(err) = err { error_handler( err, - ErrorContext::System { + ErrorContext::RunCondition { name: condition.name(), last_run: condition.get_last_run(), },