mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 18:47:57 -05:00
Catch exceptions raised sending telemetry events (#182)
This commit is contained in:
@@ -359,6 +359,8 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ServiceHost != null)
|
if (ServiceHost != null)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
// Send a telemetry notification for intellisense performance metrics
|
// Send a telemetry notification for intellisense performance metrics
|
||||||
ServiceHost.SendEvent(TelemetryNotification.Type, new TelemetryParams()
|
ServiceHost.SendEvent(TelemetryNotification.Type, new TelemetryParams()
|
||||||
@@ -374,6 +376,11 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logger.Write(LogLevel.Verbose, "Could not send Connection telemetry event " + ex.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Close the connection
|
// Close the connection
|
||||||
info.SqlConnection.Close();
|
info.SqlConnection.Close();
|
||||||
|
|||||||
Reference in New Issue
Block a user