From 95de690acd136e1bc69e989303e3c4b64e1c470f Mon Sep 17 00:00:00 2001 From: Kiran Challa Date: Fri, 17 Mar 2017 14:31:14 -0700 Subject: [PATCH] Log error when selfhostdeployer is unable to start the process --- .../Deployers/SelfHostDeployer.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs index 656d10d9f0..064c3d7cfd 100644 --- a/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs +++ b/src/Microsoft.AspNetCore.Server.IntegrationTesting/Deployers/SelfHostDeployer.cs @@ -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) {