Skip to content

Commit

Permalink
Merge pull request #55901 from ryzngard/issues/workspace_apply_failed…
Browse files Browse the repository at this point in the history
…_logging

Add telemetry for reasons on why `TryApplyChanges` fails in a workspace
  • Loading branch information
ryzngard authored Aug 26, 2021
2 parents dd121d3 + 1869ea3 commit b5f3439
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Workspaces/Core/Portable/Workspace/Workspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1184,6 +1184,7 @@ internal virtual bool TryApplyChanges(Solution newSolution, IProgressTracker pro
// If solution did not originate from this workspace then fail
if (newSolution.Workspace != this)
{
Logger.Log(FunctionId.Workspace_ApplyChanges, "Apply Failed: workspaces do not match");
return false;
}

Expand All @@ -1192,6 +1193,7 @@ internal virtual bool TryApplyChanges(Solution newSolution, IProgressTracker pro
// If the workspace has already accepted an update, then fail
if (newSolution.WorkspaceVersion != oldSolution.WorkspaceVersion)
{
Logger.Log(FunctionId.Workspace_ApplyChanges, "Apply Failed: Workspace has already been updated");
return false;
}

Expand Down

0 comments on commit b5f3439

Please sign in to comment.