From 01c0149a461f7226e50feda0aa0f1b07d444bd6f Mon Sep 17 00:00:00 2001 From: Dag Brattli Date: Sun, 30 Jan 2022 13:29:53 +0100 Subject: [PATCH] Fantomas --- src/Pipeline/Error.fs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Pipeline/Error.fs b/src/Pipeline/Error.fs index 93de440..571884b 100644 --- a/src/Pipeline/Error.fs +++ b/src/Pipeline/Error.fs @@ -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 @@ -20,7 +20,8 @@ module Error = | false -> try return! success ctx content - with err -> + with + | err -> stopped <- true return! error ctx err | _ -> () @@ -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>)