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. 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
  • Loading branch information
parhamsaremi committed Nov 9, 2022
1 parent 28a1101 commit ef4bd61
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 ef4bd61

Please sign in to comment.