We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 760a9e1 commit 939df2bCopy full SHA for 939df2b
crates/bevy_ecs/src/system/commands/fallible.rs
@@ -3,13 +3,15 @@ use crate::world::World;
3
use bevy_utils::tracing::error;
4
use std::fmt::Debug;
5
6
-/// TODO:
+/// The error struct provided to command error handlers.
7
+/// This contains both the error, and a mutable reference to [`World`].
8
pub struct CommandError<'a, C: FallibleCommand> {
9
pub error: C::Error,
10
pub world: &'a mut World,
11
}
12
-/// Used for specifying and error for a command.
13
+/// A [`World`] mutation that can potentially fail.
14
+/// For an infallible variant, use [`Command`].
15
pub trait FallibleCommand: Send + Sync + 'static {
16
type Error;
17
0 commit comments