diff --git a/NOnion/Exceptions.fs b/NOnion/Exceptions.fs index f70f96cb..4cd21ff8 100644 --- a/NOnion/Exceptions.fs +++ b/NOnion/Exceptions.fs @@ -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 ( diff --git a/NOnion/Services/TorServiceClient.fs b/NOnion/Services/TorServiceClient.fs index 39ffcbff..7846ffe4 100644 --- a/NOnion/Services/TorServiceClient.fs +++ b/NOnion/Services/TorServiceClient.fs @@ -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 =