Skip to content

Commit 322a9ef

Browse files
committed
Make throwing
1 parent b28a608 commit 322a9ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/GateEngine/ECS/Base/Entity.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,12 @@ extension Entity {
194194
@inlinable
195195
public func configure<T: Component, ResultType>(
196196
_ type: T.Type,
197-
_ config: (_ component: inout T) async -> ResultType
198-
) async -> ResultType {
197+
_ config: (_ component: inout T) async throws -> ResultType
198+
) async rethrows -> ResultType {
199199
if self.hasComponent(type) == false {
200200
self.insert(type.init())
201201
}
202-
return await config(&self[T.self])
202+
return try await config(&self[T.self])
203203
}
204204

205205
/// Allows changing a component, addind it first if needed.

0 commit comments

Comments
 (0)