Send an empty error message after global error is cleared
This commit is contained in:
parent
12dd8d6112
commit
628f54c77c
2 changed files with 13 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using Microsoft.DotNet.ProjectModel.Server.Models;
|
||||
|
||||
namespace Microsoft.DotNet.ProjectModel.Server.Messengers
|
||||
{
|
||||
|
@ -22,6 +23,16 @@ namespace Microsoft.DotNet.ProjectModel.Server.Messengers
|
|||
{
|
||||
send(local.GlobalErrorMessage);
|
||||
}
|
||||
else
|
||||
{
|
||||
send(new ErrorMessage
|
||||
{
|
||||
Message = null,
|
||||
Path = null,
|
||||
Line = -1,
|
||||
Column = -1
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected override void SetValue(ProjectSnapshot local, ProjectSnapshot remote)
|
||||
|
|
|
@ -358,8 +358,8 @@ namespace Microsoft.DotNet.ProjectModel.Server.Tests
|
|||
|
||||
File.WriteAllText(projectFile, content);
|
||||
client.SendPayLoad(testProject, MessageTypes.FilesChanged);
|
||||
messages = client.DrainAllMessages();
|
||||
messages.AssertDoesNotContain(MessageTypes.Error);
|
||||
var clearError = client.DrainTillFirst(MessageTypes.Error);
|
||||
clearError.Payload.AsJObject().AssertProperty("Message", null as string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue