Final iteration, fixing a couple mistakes for query exceptions

This commit is contained in:
benrr101
2016-08-16 16:14:27 -07:00
parent 062c40368d
commit 709123eaaf
2 changed files with 1 additions and 2 deletions

View File

@@ -177,12 +177,10 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
{ {
HasError = true; HasError = true;
UnwrapDbException(dbe); UnwrapDbException(dbe);
conn?.Dispose();
} }
catch (Exception) catch (Exception)
{ {
HasError = true; HasError = true;
conn?.Dispose();
throw; throw;
} }
finally finally

View File

@@ -213,6 +213,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
} }
catch (InvalidOperationException e) catch (InvalidOperationException e)
{ {
// If this exception occurred, we most likely were trying to cancel a completed query
await requestContext.SendResult(new QueryCancelResult await requestContext.SendResult(new QueryCancelResult
{ {
Messages = e.Message Messages = e.Message