mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-05 01:25:45 -05:00
Fixing bug in GetOrOpenConnection (#234)
Fixes a bug where the GetOrOpenConnection method of the ConnectionService would throw if the connection didn't exist. It would yield a very unhelpful "key not found in collection" exception. The code has been updated to be much more helpful and fix the bug.
This commit is contained in:
@@ -730,6 +730,11 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
return Keys.GetString(Keys.ConnectionServiceListDbErrorNotConnected, uri);
|
||||
}
|
||||
|
||||
public static string ConnectionServiceDbErrorDefaultNotConnected(string uri)
|
||||
{
|
||||
return Keys.GetString(Keys.ConnectionServiceDbErrorDefaultNotConnected, uri);
|
||||
}
|
||||
|
||||
public static string ConnectionServiceConnStringInvalidAuthType(string authType)
|
||||
{
|
||||
return Keys.GetString(Keys.ConnectionServiceConnStringInvalidAuthType, authType);
|
||||
@@ -802,6 +807,9 @@ namespace Microsoft.SqlTools.ServiceLayer
|
||||
public const string ConnectionServiceListDbErrorNotConnected = "ConnectionServiceListDbErrorNotConnected";
|
||||
|
||||
|
||||
public const string ConnectionServiceDbErrorDefaultNotConnected = "ConnectionServiceDbErrorDefaultNotConnected";
|
||||
|
||||
|
||||
public const string ConnectionServiceConnStringInvalidAuthType = "ConnectionServiceConnStringInvalidAuthType";
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user