Skip to content

Commit 38a731b

Browse files
meridaioTheAngryByrd
authored andcommitted
Add doc to Task.catch
1 parent 67cea1e commit 38a731b

File tree

1 file changed

+4
-0
lines changed
  • src/FsToolkit.ErrorHandling.TaskResult

1 file changed

+4
-0
lines changed

src/FsToolkit.ErrorHandling.TaskResult/Task.fs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ module Task =
3434

3535
let ofUnit (t : Task) = task { return! t }
3636

37+
/// Creates a `Task` that attempts to execute the provided task,
38+
/// returning `Choice1Of2` with the result if the task completes
39+
/// without exceptions, or `Choice2Of2` with the exception if an
40+
/// exception is thrown.
3741
let catch (x : Task<_>) =
3842
task {
3943
try

0 commit comments

Comments
 (0)