aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-10-23 13:58:03 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-10-23 13:58:03 -0400
commitb6f019b7f2d16d5c3ba4e51a4f7cd6f58b877c0a (patch)
tree5697c22710594c40f60a5cae9068626b27e3a111
parent11c5bd4a74a3e2bb9eeb10157fd80da5e9f8c7af (diff)
update store exception
-rw-r--r--MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs27
-rw-r--r--SharedVersion.cs4
2 files changed, 25 insertions, 6 deletions
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
index e3a00efb5..ae3c43d7e 100644
--- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
+++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs
@@ -211,8 +211,9 @@ namespace MediaBrowser.Common.Implementations.Security
if (reg == null)
{
- _logger.Warn("Result from appstore registration was null. Defaulting to empty.");
- reg = new RegRecord();
+ var msg = "Result from appstore registration was null.";
+ _logger.Error(msg);
+ throw new ApplicationException(msg);
}
if (!String.IsNullOrEmpty(reg.key))
{
@@ -221,17 +222,35 @@ namespace MediaBrowser.Common.Implementations.Security
}
}
+ catch (ApplicationException)
+ {
+ SaveAppStoreInfo(parameters);
+ throw;
+ }
catch (Exception e)
{
_logger.ErrorException("Error registering appstore purchase {0}", e, parameters ?? "NO PARMS SENT");
- //Save all transaction information to a file
- File.WriteAllText(Path.Combine(_appPaths.ProgramDataPath, "apptrans-error.txt"), parameters);
+ SaveAppStoreInfo(parameters);
//TODO - could create a re-try routine on start-up if this file is there. For now we can handle manually.
throw new ApplicationException("Error registering store sale");
}
}
+ private void SaveAppStoreInfo(string info)
+ {
+ // Save all transaction information to a file
+
+ try
+ {
+ File.WriteAllText(Path.Combine(_appPaths.ProgramDataPath, "apptrans-error.txt"), info);
+ }
+ catch (IOException)
+ {
+
+ }
+ }
+
private async Task<MBRegistrationRecord> GetRegistrationStatusInternal(string feature,
string mb2Equivalent = null,
string version = null)
diff --git a/SharedVersion.cs b/SharedVersion.cs
index 8ac45ca4e..ab168e6ea 100644
--- a/SharedVersion.cs
+++ b/SharedVersion.cs
@@ -1,4 +1,4 @@
using System.Reflection;
-//[assembly: AssemblyVersion("3.0.*")]
-[assembly: AssemblyVersion("3.0.5768.5")]
+[assembly: AssemblyVersion("3.0.*")]
+//[assembly: AssemblyVersion("3.0.5768.5")]