mirror of https://github.com/Radarr/Radarr
Better error message when error is received from SABnzbd
This commit is contained in:
parent
e309f89ea1
commit
7084b0244e
|
@ -0,0 +1,15 @@
|
||||||
|
using NzbDrone.Common.Exceptions;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Download.Clients
|
||||||
|
{
|
||||||
|
public class DownloadClientException : NzbDroneException
|
||||||
|
{
|
||||||
|
public DownloadClientException(string message, params object[] args) : base(message, args)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public DownloadClientException(string message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -97,7 +97,6 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
||||||
|
|
||||||
var response = ProcessRequest(request, action, settings);
|
var response = ProcessRequest(request, action, settings);
|
||||||
return Json.Deserialize<SabnzbdQueue>(JObject.Parse(response).SelectToken("queue").ToString());
|
return Json.Deserialize<SabnzbdQueue>(JObject.Parse(response).SelectToken("queue").ToString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public SabnzbdHistory GetHistory(int start, int limit, SabnzbdSettings settings)
|
public SabnzbdHistory GetHistory(int start, int limit, SabnzbdSettings settings)
|
||||||
|
@ -156,7 +155,7 @@ namespace NzbDrone.Core.Download.Clients.Sabnzbd
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.Failed)
|
if (result.Failed)
|
||||||
throw new ApplicationException(result.Error);
|
throw new DownloadClientException("Error response received from SABnzbd: {0}", result.Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Find a better home for this
|
//TODO: Find a better home for this
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace NzbDrone.Core.Jobs
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.ErrorException("Error occurred while execution task " + task.TypeName, e);
|
_logger.ErrorException("Error occurred while executing task " + task.TypeName, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue