mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-21 09:35:39 -05:00
Made connection errors more user-friendly (#57)
This commit is contained in:
@@ -162,8 +162,16 @@ namespace Microsoft.SqlTools.ServiceLayer.Connection
|
||||
connectionInfo.SqlConnection = connectionInfo.Factory.CreateSqlConnection(connectionString);
|
||||
connectionInfo.SqlConnection.Open();
|
||||
}
|
||||
catch(Exception ex)
|
||||
catch (SqlException ex)
|
||||
{
|
||||
response.ErrorNumber = ex.Number;
|
||||
response.ErrorMessage = ex.Message;
|
||||
response.Messages = ex.ToString();
|
||||
return response;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
response.ErrorMessage = ex.Message;
|
||||
response.Messages = ex.ToString();
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user