File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Sources/ComposableArchitecture Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,16 @@ extension Effect {
21
21
}
22
22
23
23
/// Creates an effect that executes some work in the real world that doesn't need to feed data
24
- /// back into the store.
24
+ /// back into the store. If an error is thrown, the effect will complete and the error will be ignored.
25
25
///
26
26
/// - Parameter work: A closure encapsulating some work to execute in the real world.
27
27
/// - Returns: An effect.
28
- public static func fireAndForget( _ work: @escaping ( ) -> Void ) -> Effect {
28
+ ///
29
+ /// - Parameter work: A closure encapsulating some work to execute in the real world.
30
+ /// - Returns: An effect.
31
+ public static func fireAndForget( _ work: @escaping ( ) throws -> Void ) -> Effect {
29
32
. deferred { ( ) -> SignalProducer < Value , Error > in
30
- work ( )
33
+ try ? work ( )
31
34
return . empty
32
35
}
33
36
}
You can’t perform that action at this time.
0 commit comments