Add try/catch blocks for request handlers (#408)

* Add try/catch for request handlers

* Fix test break
This commit is contained in:
Karl Burtram
2017-07-13 07:18:34 -07:00
committed by GitHub
parent 414949d129
commit 005fc9e4df
6 changed files with 441 additions and 306 deletions

View File

@@ -82,10 +82,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Workspace
TextDocument = new TextDocumentItem {Uri = TestObjects.ScriptUri}
};
// Then:
// ... There should be a file not found exception thrown
// TODO: This logic should be changed to not create the ScriptFile
await Assert.ThrowsAnyAsync<IOException>(
() => workspaceService.HandleDidCloseTextDocumentNotification(requestParams, eventContext));
await workspaceService.HandleDidCloseTextDocumentNotification(requestParams, eventContext);
// ... There should still be no open files
// ... The callback should not have been called