mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-31 20:24:21 -04:00
update store exception
This commit is contained in:
parent
11c5bd4a74
commit
b6f019b7f2
@ -211,8 +211,9 @@ namespace MediaBrowser.Common.Implementations.Security
|
|||||||
|
|
||||||
if (reg == null)
|
if (reg == null)
|
||||||
{
|
{
|
||||||
_logger.Warn("Result from appstore registration was null. Defaulting to empty.");
|
var msg = "Result from appstore registration was null.";
|
||||||
reg = new RegRecord();
|
_logger.Error(msg);
|
||||||
|
throw new ApplicationException(msg);
|
||||||
}
|
}
|
||||||
if (!String.IsNullOrEmpty(reg.key))
|
if (!String.IsNullOrEmpty(reg.key))
|
||||||
{
|
{
|
||||||
@ -221,17 +222,35 @@ namespace MediaBrowser.Common.Implementations.Security
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
catch (ApplicationException)
|
||||||
|
{
|
||||||
|
SaveAppStoreInfo(parameters);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_logger.ErrorException("Error registering appstore purchase {0}", e, parameters ?? "NO PARMS SENT");
|
_logger.ErrorException("Error registering appstore purchase {0}", e, parameters ?? "NO PARMS SENT");
|
||||||
//Save all transaction information to a file
|
SaveAppStoreInfo(parameters);
|
||||||
File.WriteAllText(Path.Combine(_appPaths.ProgramDataPath, "apptrans-error.txt"), parameters);
|
|
||||||
//TODO - could create a re-try routine on start-up if this file is there. For now we can handle manually.
|
//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");
|
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,
|
private async Task<MBRegistrationRecord> GetRegistrationStatusInternal(string feature,
|
||||||
string mb2Equivalent = null,
|
string mb2Equivalent = null,
|
||||||
string version = null)
|
string version = null)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
//[assembly: AssemblyVersion("3.0.*")]
|
[assembly: AssemblyVersion("3.0.*")]
|
||||||
[assembly: AssemblyVersion("3.0.5768.5")]
|
//[assembly: AssemblyVersion("3.0.5768.5")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user