Skip to content

Commit

Permalink
Fantomas
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrattli committed Jan 30, 2022
1 parent 768db9d commit 01c0149
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Pipeline/Error.fs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ open Oryx

module Error =
/// Handler for protecting the pipeline from exceptions and protocol violations.
let protect<'TContext, 'TSource> (source : Pipeline<'TContext, 'TSource>) : Pipeline<'TContext, 'TSource> =
let protect<'TContext, 'TSource> (source: Pipeline<'TContext, 'TSource>) : Pipeline<'TContext, 'TSource> =
fun success error cancel ->
let mutable stopped = false

Expand All @@ -20,7 +20,8 @@ module Error =
| false ->
try
return! success ctx content
with err ->
with
| err ->
stopped <- true
return! error ctx err
| _ -> ()
Expand All @@ -43,9 +44,9 @@ module Error =
return! cancel ctx
| _ -> ()
}

source success' error' cancel'

/// Handler for catching errors and then delegating to the error handler on what to do.
let catch<'TContext, 'TSource>
(errorHandler: 'TContext -> exn -> Pipeline<'TContext, 'TSource>)
Expand Down

0 comments on commit 01c0149

Please sign in to comment.