File tree 2 files changed +3
-3
lines changed
crates/bevy_ecs/src/error
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ mod global_error_handler {
86
86
/// currently have a way to express atomic function pointers.
87
87
/// Should we add support for a platform on which function pointers and data pointers
88
88
/// have different sizes, the transmutation back will fail to compile. In that case,
89
- /// we can replace the atomic pointer with a regular pointer protected by a `RwLock `
89
+ /// we can replace the atomic pointer with a regular pointer protected by a `OnceLock `
90
90
/// on only those platforms.
91
91
/// SAFETY: Only accessible from within this module.
92
92
static HANDLER : AtomicPtr < ( ) > = AtomicPtr :: new ( panic as * mut ( ) ) ;
Original file line number Diff line number Diff line change 35
35
//! context surrounding the error – such as the system's [`name`] – in your error messages.
36
36
//!
37
37
//! ```rust, ignore
38
- //! use bevy_ecs::error::{set_global_error_handler , BevyError, ErrorContext};
38
+ //! use bevy_ecs::error::{set_global_default_error_handler , BevyError, ErrorContext};
39
39
//! use log::trace;
40
40
//!
41
41
//! fn my_error_handler(error: BevyError, ctx: ErrorContext) {
47
47
//! }
48
48
//!
49
49
//! fn main() {
50
- //! set_global_error_handler (my_error_handler);
50
+ //! set_global_default_error_handler (my_error_handler);
51
51
//!
52
52
//! // Initialize your Bevy App here
53
53
//! }
You can’t perform that action at this time.
0 commit comments