Better client side errors when there are issues communicating with trakt.

This commit is contained in:
Mark McDowall
2013-09-08 23:40:24 -07:00
parent 377e5d28e9
commit 0c57c6a6c1
10 changed files with 95 additions and 37 deletions
@@ -0,0 +1,20 @@
using System.Net;
namespace NzbDrone.Common.Exceptions
{
public class NzbDroneClientException : NzbDroneException
{
public HttpStatusCode StatusCode { get; private set; }
public NzbDroneClientException(HttpStatusCode statusCode, string message, params object[] args) : base(message, args)
{
StatusCode = statusCode;
}
public NzbDroneClientException(HttpStatusCode statusCode, string message)
: base(message)
{
StatusCode = statusCode;
}
}
}
@@ -2,8 +2,6 @@
namespace NzbDrone.Common.Exceptions
{
public abstract class NzbDroneException : ApplicationException
{
protected NzbDroneException(string message, params object[] args)
+1
View File
@@ -88,6 +88,7 @@
<Compile Include="EnvironmentInfo\StartupArguments.cs" />
<Compile Include="EnvironmentInfo\RuntimeInfo.cs" />
<Compile Include="EnvironmentInfo\OsInfo.cs" />
<Compile Include="Exceptions\NzbDroneClientException.cs" />
<Compile Include="Exceptions\NzbDroneException.cs" />
<Compile Include="IEnumerableExtensions.cs" />
<Compile Include="Instrumentation\GlobalExceptionHandlers.cs" />