Skip to content

Commit 04197ca

Browse files
author
Jamil Maqdis Anton
committed
Rename simpleExceptionHandler to asyncExceptionHandler
1 parent 33f766d commit 04197ca

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/Append.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ module Append =
99
(messageDetails: MessageDetails)
1010
: Async<Result<AppendResult, string>> =
1111
AppendRaw.appendNewMessage store streamName appendVersion messageDetails
12-
|> ExceptionsHandler.simpleExceptionHandler
12+
|> ExceptionsHandler.asyncExceptionHandler
1313

1414
let appendNewMessages (store: SqlStreamStore.IStreamStore)
1515
(streamName: string)
1616
(appendVersion: AppendVersion)
1717
(messages: MessageDetails list)
1818
: Async<Result<AppendResult, string>> =
1919
AppendRaw.appendNewMessages store streamName appendVersion messages
20-
|> ExceptionsHandler.simpleExceptionHandler
20+
|> ExceptionsHandler.asyncExceptionHandler

src/ExceptionsHandler.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Async =
44
let map f m = async.Bind(m, (f >> async.Return))
55

66
module ExceptionsHandler =
7-
let simpleExceptionHandler (op: Async<'res>): Async<Result<'res, string>> =
7+
let asyncExceptionHandler (op: Async<'res>): Async<Result<'res, string>> =
88
op
99
|> Async.Catch
1010
|> Async.map (function

src/Postgres.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ module Postgres =
6666
let createSchema (store: SqlStreamStore.PostgresStreamStore): Async<Result<unit, string>> =
6767
store.CreateSchemaIfNotExists()
6868
|> Async.AwaitTask
69-
|> ExceptionsHandler.simpleExceptionHandler
69+
|> ExceptionsHandler.asyncExceptionHandler

src/Read.fs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Read =
99
(msgCount: int)
1010
: Async<Result<ReadAllPage, string>> =
1111
ReadRaw.readFromAllStream store readingDirection startPositionInclusive msgCount
12-
|> ExceptionsHandler.simpleExceptionHandler
12+
|> ExceptionsHandler.asyncExceptionHandler
1313

1414
let readFromStream (store: SqlStreamStore.IStreamStore)
1515
(readingDirection: ReadingDirection)
@@ -18,15 +18,15 @@ module Read =
1818
(msgCount: int)
1919
: Async<Result<ReadStreamPage, string>> =
2020
ReadRaw.readFromStream store readingDirection streamName readVersion msgCount
21-
|> ExceptionsHandler.simpleExceptionHandler
21+
|> ExceptionsHandler.asyncExceptionHandler
2222

2323
let readFromAllStreamAndPrefetchJsonData (store: SqlStreamStore.IStreamStore)
2424
(readingDirection: ReadingDirection)
2525
(startPositionInclusive: StartPosition)
2626
(msgCount: int)
2727
: Async<Result<ReadAllPage, string>> =
2828
ReadRaw.readFromAllStream' store readingDirection startPositionInclusive msgCount true
29-
|> ExceptionsHandler.simpleExceptionHandler
29+
|> ExceptionsHandler.asyncExceptionHandler
3030

3131
let readFromStreamAndPrefetchJsonData (store: SqlStreamStore.IStreamStore)
3232
(readingDirection: ReadingDirection)
@@ -35,4 +35,4 @@ module Read =
3535
(msgCount: int)
3636
: Async<Result<ReadStreamPage, string>> =
3737
ReadRaw.readFromStream' store readingDirection streamName readVersion msgCount true
38-
|> ExceptionsHandler.simpleExceptionHandler
38+
|> ExceptionsHandler.asyncExceptionHandler

0 commit comments

Comments
 (0)