The Free Software Media System - Server Backend & API
update store exception
Luke Pulverentib6f019b7f2d1
diff --git a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.csindex e3a00efb5b..ae3c43d7e7 100644--- a/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs+++ b/MediaBrowser.Common.Implementations/Security/PluginSecurityManager.cs@@ -211,8 +211,9 @@ namespace MediaBrowser.Common.Implementations.Securityif (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.csindex 8ac45ca4eb..ab168e6eaf 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")]