summaryrefslogtreecommitdiff
path: root/engine-ecs/src/lib.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-06-28 17:36:20 +0200
committerHampusM <hampus@hampusmat.com>2026-06-30 18:24:47 +0200
commit3dc6e1131d951f88220403fef75cbe13f5edda6b (patch)
tree2f42dfcca61d3167ea6dd4cd29e192a490b0653b /engine-ecs/src/lib.rs
parent4935059726af72434cb6803e1ebd5e4430183b9f (diff)
feat(engine-ecs): pass world ref to error handlers
Diffstat (limited to 'engine-ecs/src/lib.rs')
-rw-r--r--engine-ecs/src/lib.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/engine-ecs/src/lib.rs b/engine-ecs/src/lib.rs
index 28b6b06..e9a28ab 100644
--- a/engine-ecs/src/lib.rs
+++ b/engine-ecs/src/lib.rs
@@ -19,7 +19,7 @@ use crate::component::{
use crate::entity::{Declaration as EntityDeclaration, Handle as EntityHandle, Name as EntityName};
use crate::error::{
err_handler_panic,
- ErrorHandler,
+ HandlerFn as ErrorHandlerFn,
Metadata as ErrorMetadata,
SourceKind as ErrorSourceKind,
};
@@ -87,7 +87,7 @@ pub struct World
data: WorldData,
stop: AtomicBool,
is_first_tick: AtomicBool,
- error_handler: ErrorHandler,
+ error_handler: ErrorHandlerFn,
}
impl World
@@ -109,7 +109,7 @@ impl World
world
}
- pub fn set_err_handler(&mut self, err_handler: ErrorHandler)
+ pub fn set_err_handler(&mut self, err_handler: ErrorHandlerFn)
{
self.error_handler = err_handler;
}
@@ -414,6 +414,7 @@ impl World
cold_path();
(self.error_handler)(
+ self,
err,
ErrorMetadata {
source_name: system.system.name(),
@@ -667,6 +668,7 @@ impl World
cold_path();
(self.error_handler)(
+ self,
err,
ErrorMetadata {
source_name: observer.name(),