Example #1
0
        private void NotifyError(ILogger logger, DeploymentStatusFile trackingFile, Exception exception)
        {
            logger.Log("Deployment failed.", LogEntryType.Error);

            if (trackingFile != null)
            {
                // Failed to deploy
                trackingFile.Percentage = 100;
                trackingFile.Complete = true;
                trackingFile.Status = DeployStatus.Failed;
                trackingFile.StatusText = trackingFile.Status == DeployStatus.Failed ? logger.GetTopLevelError() : String.Empty;
                trackingFile.DeploymentEndTime = DateTime.Now;
                trackingFile.Save(_fileSystem);
            }
        }