update db queries

This commit is contained in:
Luke Pulverenti
2015-10-29 09:28:05 -04:00
parent a9e0797878
commit 0bd1f36ece
30 changed files with 432 additions and 245 deletions

View File

@@ -8,8 +8,10 @@ using MediaBrowser.Model.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Net;
namespace MediaBrowser.Common.Implementations.Security
{
@@ -219,10 +221,6 @@ namespace MediaBrowser.Common.Implementations.Security
{
SupporterKey = reg.key;
}
else
{
throw new PaymentRequiredException();
}
}
}
@@ -231,10 +229,15 @@ namespace MediaBrowser.Common.Implementations.Security
SaveAppStoreInfo(parameters);
throw;
}
catch (PaymentRequiredException)
catch (HttpException e)
{
SaveAppStoreInfo(parameters);
throw;
_logger.ErrorException("Error registering appstore purchase {0}", e, parameters ?? "NO PARMS SENT");
if (e.StatusCode.HasValue && e.StatusCode.Value == HttpStatusCode.PaymentRequired)
{
throw new PaymentRequiredException();
}
throw new ApplicationException("Error registering store sale");
}
catch (Exception e)
{