Skip to content

Commit ba84cf0

Browse files
authored
Document exceptions SqlConnection constructors might throw (#435)
1 parent bee5e0d commit ba84cf0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,14 @@ using (SqlConnection connection = new SqlConnection(connectionString))
115115
116116
]]></format>
117117
</remarks>
118+
<exception cref="T:System.ArgumentException">The supplied connection string argument failed <see cref="T:Microsoft.Data.SqlClient.SqlConnection.ConnectionString" /> validation.</exception>
118119
</ctorConnectionString>
119120
<ctorConnectionStringCredential>
120121
<param name="connectionString">A connection string that does not use any of the following connection string keywords: <see langword="Integrated Security = true" />, <see langword="UserId" />, or <see langword="Password" />; or that does not use <see langword="ContextConnection = true" />.</param>
121122
<param name="credential">A <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object. If <paramref name="credential" /> is null, <see cref="M:Microsoft.Data.SqlClient.SqlConnection.#ctor(System.String,Microsoft.Data.SqlClient.SqlCredential)" /> is functionally equivalent to <see cref="M:Microsoft.Data.SqlClient.SqlConnection.#ctor(System.String)" />.</param>
122123
<summary>Initializes a new instance of the <see cref="T:Microsoft.Data.SqlClient.SqlConnection" /> class given a connection string, that does not use <see langword="Integrated Security = true" /> and a <see cref="T:Microsoft.Data.SqlClient.SqlCredential" /> object that contains the user ID and password.</summary>
123124
<remarks>To be added.</remarks>
125+
<exception cref="T:System.ArgumentException">The supplied arguments failed validation, including <see cref="T:Microsoft.Data.SqlClient.SqlConnection.ConnectionString" /> validation.</exception>
124126
</ctorConnectionStringCredential>
125127
<AccessToken>
126128
<summary>Gets or sets the access token for the connection.</summary>

0 commit comments

Comments
 (0)