Skip to content

Commit

Permalink
Services: ret NOnionException downloadDescriptor
Browse files Browse the repository at this point in the history
Previously returned exception with failwith which returned
System.Exception. Now it returns NOnionExceptoin.

Fixes nblockchain/geewallet#181
  • Loading branch information
parhamsaremi committed Nov 9, 2022
1 parent 28a1101 commit 0bf778d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NOnion/Exceptions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ type UnsuccessfulIntroductionException internal (status: RelayIntroduceStatus) =
type IntroductoinPointsKilledException() =
inherit NOnionException("Introduction points got disconnected, please try again!")

type DescriptorDownloadFailedException() =
inherit NOnionException("Can't download descriptor, all requests failed.")

type NOnionSocketException
internal
(
Expand Down
3 changes: 1 addition & 2 deletions NOnion/Services/TorServiceClient.fs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ type TorServiceClient =
match responsibleDirs with
| [] ->
return
failwith
"TorServiceClient: can't download descriptor, all requests failed."
raise <| DescriptorDownloadFailedException()
| hsDirectory :: tail ->
try
let! guardEndPoint, randomGuardNode =
Expand Down

0 comments on commit 0bf778d

Please sign in to comment.