Log error when selfhostdeployer is unable to start the process

This commit is contained in:
Kiran Challa 2017-03-17 14:31:14 -07:00
parent 45874704a9
commit 95de690acd
1 changed files with 11 additions and 3 deletions

View File

@ -112,9 +112,17 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting
{
TriggerHostShutdown(hostExitTokenSource);
};
HostProcess.Start();
HostProcess.BeginErrorReadLine();
HostProcess.BeginOutputReadLine();
try
{
HostProcess.Start();
HostProcess.BeginErrorReadLine();
HostProcess.BeginOutputReadLine();
}
catch (Exception ex)
{
Logger.LogError("Error occurred while starting the process. Exception: {exception}", ex.ToString());
}
if (HostProcess.HasExited)
{