Skip to content

Commit 8bd54ba

Browse files
gustywallymathieu
authored andcommitted
+ (Value)Task.mapError
1 parent 4d0524f commit 8bd54ba

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/FSharpPlus/Extensions/Task.fs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ module Task =
487487
let inline recover ([<InlineIfLambda>]mapper: exn -> 'T) (source: Task<'T>) : Task<'T> =
488488
let source = nullArgCheck (nameof source) source
489489

490-
tryWith (fun () -> source) (mapper >> Task.FromResult)
490+
tryWith (fun () -> source) (mapper >> Task.FromResult)
491491
#else
492492
let inline recover (mapper: exn -> 'T) (source: Task<'T>) : Task<'T> =
493493
raiseIfNull "source" source
@@ -499,7 +499,11 @@ module Task =
499499
/// <param name="mapper">Mapping function from exception to exception.</param>
500500
/// <param name="source">The source task.</param>
501501
/// <returns>The resulting task.</returns>
502+
#if !NET45
503+
let inline mapError ([<InlineIfLambda>]mapper: exn -> exn) (source: Task<'T>) : Task<'T> =
504+
#else
502505
let mapError (mapper: exn -> exn) (source: Task<'T>) : Task<'T> =
506+
#endif
503507
#if !NET45
504508
let source = nullArgCheck (nameof source) source
505509
#else

0 commit comments

Comments
 (0)