improved log for license mismatch issues

This commit is contained in:
2022-08-27 20:27:13 +00:00
parent 55c3c373f7
commit 9bea20023a
3 changed files with 25 additions and 31 deletions

View File

@@ -1068,7 +1068,7 @@ EQIDAQAB
if (MExBB(Util.FileUtil.GetLinkerTimestampUtc(System.Reflection.Assembly.GetExecutingAssembly()), key))
{
Console.WriteLine(LICENSE_MISMATCH_TO_BUILD_ERROR);
log.LogError("E1020 - build too new for license");
//NOTE: LICENSE_MISMATCH_TO_BUILD_ERROR matched for in startup.cs DO NOT change this without fixing the side effects
throw new ApplicationException(LICENSE_MISMATCH_TO_BUILD_ERROR);
}
@@ -1077,6 +1077,7 @@ EQIDAQAB
#if (SUBSCRIPTION_BUILD)
if(key.Perpetual){
Console.WriteLine(LICENSE_MISMATCH_TO_BUILD_ERROR);
log.LogError("E1020 - subscription build but perpetual key");
//NOTE: LICENSE_MISMATCH_TO_BUILD_ERROR bit below is checked for in startup.cs DO NOT remove this without fixing the side effects
throw new ApplicationException(LICENSE_MISMATCH_TO_BUILD_ERROR);
}
@@ -1084,6 +1085,7 @@ EQIDAQAB
if (!key.Perpetual)
{
Console.WriteLine(LICENSE_MISMATCH_TO_BUILD_ERROR);
log.LogError("E1020 - perpetual build but subscription key");
//NOTE: LICENSE_MISMATCH_TO_BUILD_ERROR bit below is checked for in startup.cs DO NOT remove this without fixing the side effects
throw new ApplicationException(LICENSE_MISMATCH_TO_BUILD_ERROR);
}