Skip to content

Commit ef4bd61

Browse files
committed
Services: ret NOnionException downloadDescriptor
Previously returned exception with failwith which returned System.Exception. Now it returns NOnionExceptoin. This work is necessary for fixing [1], but it dosn't fix it. The fix for that problem should be continued on GWallet. [1] nblockchain/geewallet#181
1 parent 28a1101 commit ef4bd61

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

NOnion/Exceptions.fs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ type UnsuccessfulIntroductionException internal (status: RelayIntroduceStatus) =
4040
type IntroductoinPointsKilledException() =
4141
inherit NOnionException("Introduction points got disconnected, please try again!")
4242

43+
type DescriptorDownloadFailedException() =
44+
inherit NOnionException("Can't download descriptor, all requests failed.")
45+
4346
type NOnionSocketException
4447
internal
4548
(

NOnion/Services/TorServiceClient.fs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ type TorServiceClient =
6161
match responsibleDirs with
6262
| [] ->
6363
return
64-
failwith
65-
"TorServiceClient: can't download descriptor, all requests failed."
64+
raise <| DescriptorDownloadFailedException()
6665
| hsDirectory :: tail ->
6766
try
6867
let! guardEndPoint, randomGuardNode =

0 commit comments

Comments
 (0)