From 98858bd2370651cb258c2faf5db50a432d9ee35c Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 27 Feb 2014 07:07:02 -0800 Subject: [PATCH] Better error messaging when connecting to nzbget fails --- src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetProxy.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetProxy.cs b/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetProxy.cs index 6428d15e5..e6d1bf54a 100644 --- a/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetProxy.cs +++ b/src/NzbDrone.Core/Download/Clients/Nzbget/NzbgetProxy.cs @@ -59,7 +59,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget { var protocol = settings.UseSsl ? "https" : "http"; - var url = String.Format("{0}//{1}:{2}/jsonrpc", + var url = String.Format("{0}://{1}:{2}/jsonrpc", protocol, settings.Host, settings.Port); @@ -85,13 +85,13 @@ namespace NzbDrone.Core.Download.Clients.Nzbget { if (response.ResponseStatus != ResponseStatus.Completed) { - throw new ApplicationException("Unable to connect to NzbGet, please check your settings"); + throw new DownloadClientException("Unable to connect to NzbGet, please check your settings"); } var result = Json.Deserialize(response.Content); if (result.Error != null) - throw new ApplicationException(result.Error.ToString()); + throw new DownloadClientException("Error response received from nzbget: {0}", result.Error.ToString()); } } }