prevent exiting immediately on error. updated mvc packages

This commit is contained in:
RaidMax 2018-03-13 19:12:24 -05:00
parent e974de8e63
commit 81d965a718
6 changed files with 21 additions and 18 deletions

View File

@ -31,16 +31,11 @@ namespace IW4MAdmin
try
{
/*var v1 = SharedLibrary.Helpers.Vector3.Parse("(737, 1117, 268)");
var v2 = SharedLibrary.Helpers.Vector3.Parse("(1510, 672.98, -228.66)");
double angleBetween = v1.AngleBetween(v2);*/
CheckDirectories();
ServerManager = ApplicationManager.GetInstance();
SharedLibrary.Database.Repair.Run(ServerManager.Logger);
ServerManager.Init().Wait();
@ -76,6 +71,11 @@ namespace IW4MAdmin
catch (Exception e)
{
Console.WriteLine($"Fatal Error during initialization: {e.Message}");
while(e.InnerException != null)
{
e = e.InnerException;
Console.WriteLine($"Inner exception: {e.Message}");
}
Console.WriteLine("Press any key to exit...");
Console.ReadKey();
return;

View File

@ -134,6 +134,9 @@ namespace IW4MAdmin
Logger.WriteDebug(e.Message);
Logger.WriteDebug($"Internal Exception: {e.Data["internal_exception"]}");
}
// throw the exception to the main method to stop before instantly exiting
throw e;
}
}

View File

@ -620,8 +620,8 @@ namespace IW4MAdmin
string mainPath = (GameName == Game.IW4 && onelog.Value >=0) ? "userraw" : "main";
string logPath = (game.Value == "" || onelog?.Value == 1) ?
$"{ basepath.Value.Replace("\\", "/")}/{mainPath}/{logfile.Value}" :
$"{basepath.Value.Replace("\\", "/")}/{game.Value}/{logfile.Value}";
$"{basepath.Value.Replace('\\', Path.DirectorySeparatorChar)}{Path.DirectorySeparatorChar}{mainPath}{Path.DirectorySeparatorChar}{logfile.Value}" :
$"{basepath.Value.Replace('\\', Path.DirectorySeparatorChar)}{Path.DirectorySeparatorChar}{game.Value.Replace('\\', Path.DirectorySeparatorChar)}{Path.DirectorySeparatorChar}{logfile.Value}";
if (!File.Exists(logPath))
{

View File

@ -14,7 +14,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>65340d7d-5831-406c-acad-b13ba634bde2</ProjectGuid>
<publishUrl>C:\Projects\IW4M-Admin\Publish</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<DeleteExistingFiles>False</DeleteExistingFiles>
<TargetFramework>net452</TargetFramework>
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
</PropertyGroup>

View File

@ -30,19 +30,19 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.0.3" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.1.5" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.7" />
<PackageReference Include="Microsoft.AspNetCore.Routing" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Server.IISIntegration" Version="1.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel" Version="1.1.3" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.3" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.0.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.2" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.0.2" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.0.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.2" />
<PackageReference Include="Microsoft.VisualStudio.Web.BrowserLink" Version="1.1.3" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">

View File

@ -8,7 +8,7 @@
}
},
"Web": {
"Address": "127.0.0.1:5000"
"Address": "http://127.0.0.1:5000"
},
"VPN": {
"APIKey": ""