Skip to content

Commit 3f29a69

Browse files
committed
Add comments that indicate where CER exception handling was removed
1 parent e56ca8c commit 3f29a69

File tree

17 files changed

+65
-1
lines changed

17 files changed

+65
-1
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,7 @@ private void BeginExecuteNonQueryInternalReadStage(TaskCompletionSource<object>
14111411
CachedAsyncState.SetActiveConnectionAndResult(completion, nameof(EndExecuteNonQuery), _activeConnection);
14121412
_stateObj.ReadSni(completion);
14131413
}
1414+
// @TODO: CER Exception Handling was removed here (see GH#3581)
14141415
catch (Exception)
14151416
{
14161417
// Similarly, if an exception occurs put the stateObj back into the pool.
@@ -1956,6 +1957,7 @@ private void BeginExecuteXmlReaderInternalReadStage(TaskCompletionSource<object>
19561957
CachedAsyncState.SetActiveConnectionAndResult(completion, nameof(EndExecuteXmlReader), _activeConnection);
19571958
_stateObj.ReadSni(completion);
19581959
}
1960+
// @TODO: CER Exception Handling was removed here (see GH#3581)
19591961
catch (Exception e)
19601962
{
19611963
// Similarly, if an exception occurs put the stateObj back into the pool.
@@ -2607,6 +2609,7 @@ private void BeginExecuteReaderInternalReadStage(TaskCompletionSource<object> co
26072609
CachedAsyncState.SetActiveConnectionAndResult(completion, nameof(EndExecuteReader), _activeConnection);
26082610
_stateObj.ReadSni(completion);
26092611
}
2612+
// @TODO: CER Exception Handling was removed here (see GH#3581)
26102613
catch (Exception e)
26112614
{
26122615
// Similarly, if an exception occurs put the stateObj back into the pool.

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,7 @@ public override void ChangeDatabase(string database)
12431243
statistics = SqlStatistics.StartTimer(Statistics);
12441244
InnerConnection.ChangeDatabase(database);
12451245
}
1246+
// @TODO: CER Exception Handling was removed here (see GH#3581)
12461247
finally
12471248
{
12481249
SqlStatistics.StopTimer(statistics);
@@ -1334,6 +1335,7 @@ public override void Close()
13341335
_statistics._closeTimestamp = ADP.TimerCurrent();
13351336
}
13361337
}
1338+
// @TODO: CER Exception Handling was removed here (see GH#3581)
13371339
catch (Exception ex)
13381340
{
13391341
e = ex;

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ internal SqlInternalConnectionTds(
570570
}
571571
}
572572
}
573+
// @TODO: CER Exception Handling was removed here (see GH#3581)
573574
finally
574575
{
575576
ThreadHasParserLockForClose = false;
@@ -2130,6 +2131,7 @@ internal bool GetSessionAndReconnectIfNeeded(SqlConnection parent, int timeout =
21302131
return true;
21312132
}
21322133
return false;
2134+
// @TODO: CER Exception Handling was removed here (see GH#3581)
21332135
}
21342136
finally
21352137
{

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4716,6 +4716,7 @@ internal void DrainData(TdsParserStateObject stateObj)
47164716
}
47174717
Run(RunBehavior.Clean, null, null, null, stateObj);
47184718
}
4719+
// @TODO: CER Exception Handling was removed here (see GH#3581)
47194720
catch
47204721
{
47214722
_connHandler.DoomThisConnection();
@@ -10213,6 +10214,7 @@ private void FinalizeExecuteRPC(TdsParserStateObject stateObj)
1021310214
private void TdsExecuteRPC_OnFailure(Exception exc, TdsParserStateObject stateObj)
1021410215
{
1021510216
FailureCleanup(stateObj, exc);
10217+
// @TODO: CER Exception Handling was removed here (see GH#3581)
1021610218
}
1021710219

1021810220
private void ExecuteFlushTaskCallback(Task tsk, TdsParserStateObject stateObj, TaskCompletionSource<object> completion, bool releaseConnectionLock)
@@ -10228,6 +10230,7 @@ private void ExecuteFlushTaskCallback(Task tsk, TdsParserStateObject stateObj, T
1022810230
{
1022910231
FailureCleanup(stateObj, tsk.Exception);
1023010232
}
10233+
// @TODO: CER Exception Handling was removed here (see GH#3581)
1023110234
catch (Exception e)
1023210235
{
1023310236
exc = e;
@@ -11923,6 +11926,7 @@ public override Task WriteAsync(byte[] buffer, int offset, int count, Cancellati
1192311926
}
1192411927

1192511928
return task ?? Task.CompletedTask;
11929+
// @TODO: CER Exception Handling was removed here (see GH#3581)
1192611930
}
1192711931

1192811932
internal static void ValidateWriteParameters(byte[] buffer, int offset, int count)

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlCommand.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ private SqlCommand(SqlCommand from) : this()
515515
// cleanup
516516
Unprepare();
517517
}
518+
// @TODO: CER Exception Handling was removed here (see GH#3581)
518519
catch (Exception)
519520
{
520521
// we do not really care about errors in unprepare (may be the old connection went bad)
@@ -952,6 +953,7 @@ public override void Prepare()
952953

953954
InternalPrepare();
954955
}
956+
// @TODO: CER Exception Handling was removed here (see GH#3581)
955957
catch (Exception e)
956958
{
957959
processFinallyBlock = ADP.IsCatchableExceptionType(e);
@@ -1107,6 +1109,7 @@ public override void Cancel()
11071109
}
11081110
}
11091111
}
1112+
// @TODO: CER Exception Handling was removed here (see GH#3581)
11101113
}
11111114
}
11121115
finally
@@ -1420,6 +1423,7 @@ private void BeginExecuteNonQueryInternalReadStage(TaskCompletionSource<object>
14201423
CachedAsyncState.SetActiveConnectionAndResult(completion, nameof(EndExecuteNonQuery), _activeConnection);
14211424
_stateObj.ReadSni(completion);
14221425
}
1426+
// @TODO: CER Exception Handling was removed here (see GH#3581)
14231427
catch (Exception)
14241428
{
14251429
// Similarly, if an exception occurs put the stateObj back into the pool.
@@ -1693,6 +1697,7 @@ private object InternalEndExecuteNonQuery(
16931697

16941698
Debug.Assert(_stateObj == null, "non-null state object in EndExecuteNonQuery");
16951699
return _rowsAffected;
1700+
// @TODO: CER Exception Handling was removed here (see GH#3581)
16961701
}
16971702

16981703
private Task InternalExecuteNonQuery(
@@ -1776,6 +1781,7 @@ private Task InternalExecuteNonQuery(
17761781
}
17771782
Debug.Assert(isAsync || _stateObj == null, "non-null state object in InternalExecuteNonQuery");
17781783
return task;
1784+
// @TODO: CER Exception Handling was removed here (see GH#3581)
17791785
}
17801786

17811787
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml' path='docs/members[@name="SqlCommand"]/ExecuteXmlReader/*'/>
@@ -1954,6 +1960,7 @@ private void BeginExecuteXmlReaderInternalReadStage(TaskCompletionSource<object>
19541960
CachedAsyncState.SetActiveConnectionAndResult(completion, nameof(EndExecuteXmlReader), _activeConnection);
19551961
_stateObj.ReadSni(completion);
19561962
}
1963+
// @TODO: CER Exception Handling was removed here (see GH#3581)
19571964
catch (Exception e)
19581965
{
19591966
// Similarly, if an exception occurs put the stateObj back into the pool.
@@ -2160,6 +2167,7 @@ protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
21602167
sqlExceptionNumber = e.Number;
21612168
throw;
21622169
}
2170+
// @TODO: CER Exception Handling was removed here (see GH#3581)
21632171
finally
21642172
{
21652173
SqlStatistics.StopTimer(statistics);
@@ -2572,6 +2580,7 @@ private void BeginExecuteReaderInternalReadStage(TaskCompletionSource<object> co
25722580
CachedAsyncState.SetActiveConnectionAndResult(completion, nameof(EndExecuteReader), _activeConnection);
25732581
_stateObj.ReadSni(completion);
25742582
}
2583+
// @TODO: CER Exception Handling was removed here (see GH#3581)
25752584
catch (Exception e)
25762585
{
25772586
// Similarly, if an exception occurs put the stateObj back into the pool.
@@ -2602,6 +2611,7 @@ private SqlDataReader InternalEndExecuteReader(IAsyncResult asyncResult, bool is
26022611
SqlDataReader reader = CompleteAsyncExecuteReader(isInternal);
26032612
Debug.Assert(_stateObj == null, "non-null state object in InternalEndExecuteReader");
26042613
return reader;
2614+
// @TODO: CER Exception Handling was removed here (see GH#3581)
26052615
}
26062616

26072617
/// <include file='../../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlCommand.xml' path='docs/members[@name="SqlCommand"]/ExecuteNonQueryAsync[@name="CancellationToken"]/*'/>
@@ -4017,6 +4027,7 @@ private void PrepareForTransparentEncryption(
40174027
describeParameterEncryptionDataReader: describeParameterEncryptionDataReader);
40184028
}
40194029
}
4030+
// @TODO: CER Exception Handling was removed here (see GH#3581)
40204031
catch (Exception e)
40214032
{
40224033
if (CachedAsyncState != null)
@@ -4827,6 +4838,7 @@ internal SqlDataReader RunExecuteReader(
48274838
{
48284839
return RunExecuteReaderTds(cmdBehavior, runBehavior, returnStream, isAsync, timeout, out task, asyncWrite && isAsync, isRetry: isRetry);
48294840
}
4841+
// @TODO: CER Exception Handling was removed here (see GH#3581)
48304842
}
48314843

48324844

@@ -5422,6 +5434,7 @@ private void ValidateCommand(bool isAsync, [CallerMemberName] string method = ""
54225434
// close any non MARS dead readers, if applicable, and then throw if still busy.
54235435
// Throw if we have a live reader on this command
54245436
_activeConnection.ValidateConnectionForExecute(method, this);
5437+
// @TODO: CER Exception Handling was removed here (see GH#3581)
54255438

54265439
// Check to see if the currently set transaction has completed. If so,
54275440
// null out our local reference.
@@ -5515,6 +5528,7 @@ private void GetStateObject(TdsParser parser = null)
55155528
private void ReliablePutStateObject()
55165529
{
55175530
PutStateObject();
5531+
// @TODO: CER Exception Handling was removed here (see GH#3581)
55185532
}
55195533

55205534
private void PutStateObject()

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlConnection.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,7 @@ public override void ChangeDatabase(string database)
12501250
statistics = SqlStatistics.StartTimer(Statistics);
12511251
InnerConnection.ChangeDatabase(database);
12521252
}
1253+
// @TODO: CER Exception Handling was removed here (see GH#3581)
12531254
finally
12541255
{
12551256
SqlStatistics.StopTimer(statistics);
@@ -1323,6 +1324,7 @@ public override void Close()
13231324
_statistics._closeTimestamp = ADP.TimerCurrent();
13241325
}
13251326
}
1327+
// @TODO: CER Exception Handling was removed here (see GH#3581)
13261328
finally
13271329
{
13281330
SqlStatistics.StopTimer(statistics);
@@ -1890,6 +1892,7 @@ private bool TryOpenInner(TaskCompletionSource<DbConnectionInternal> retry)
18901892
tdsInnerConnection.Parser.Statistics = null;
18911893
_statistics = null; // in case of previous Open/Close/reset_CollectStats sequence
18921894
}
1895+
// @TODO: CER Exception Handling was removed here (see GH#3581)
18931896

18941897
return true;
18951898
}

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ internal SqlInternalConnectionTds(
580580
}
581581
}
582582
}
583+
// @TODO: CER Exception Handling was removed here (see GH#3581)
583584
finally
584585
{
585586
ThreadHasParserLockForClose = false;
@@ -2183,6 +2184,7 @@ internal bool GetSessionAndReconnectIfNeeded(SqlConnection parent, int timeout =
21832184
return true;
21842185
}
21852186
return false;
2187+
// @TODO: CER Exception Handling was removed here (see GH#3581)
21862188
}
21872189
finally
21882190
{

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/TdsParser.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4750,6 +4750,7 @@ internal void DrainData(TdsParserStateObject stateObj)
47504750
_connHandler.DoomThisConnection();
47514751
throw;
47524752
}
4753+
// @TODO: CER Exception Handling was removed here (see GH#3581)
47534754
}
47544755

47554756

@@ -10382,6 +10383,7 @@ private void FinalizeExecuteRPC(TdsParserStateObject stateObj)
1038210383
private void TdsExecuteRPC_OnFailure(Exception exc, TdsParserStateObject stateObj)
1038310384
{
1038410385
FailureCleanup(stateObj, exc);
10386+
// @TODO: CER Exception Handling was removed here (see GH#3581)
1038510387
}
1038610388

1038710389
private void ExecuteFlushTaskCallback(Task tsk, TdsParserStateObject stateObj, TaskCompletionSource<object> completion, bool releaseConnectionLock)
@@ -10396,6 +10398,7 @@ private void ExecuteFlushTaskCallback(Task tsk, TdsParserStateObject stateObj, T
1039610398
{
1039710399
FailureCleanup(stateObj, tsk.Exception);
1039810400
}
10401+
// @TODO: CER Exception Handling was removed here (see GH#3581)
1039910402
catch (Exception e)
1040010403
{
1040110404
exc = e;
@@ -12085,6 +12088,7 @@ public override Task WriteAsync(byte[] buffer, int offset, int count, Cancellati
1208512088
}
1208612089

1208712090
return task ?? Task.CompletedTask;
12091+
// @TODO: CER Exception Handling was removed here (see GH#3581)
1208812092
}
1208912093

1209012094
internal static void ValidateWriteParameters(byte[] buffer, int offset, int count)

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/TdsParser.netfx.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ internal void AssignPendingDNSInfo(string userProtocol, string DNSCacheKey)
6767
internal bool RunReliably(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
6868
{
6969
return Run(runBehavior, cmdHandler, dataStream, bulkCopyHandler, stateObj);
70+
// @TODO: CER Exception Handling was removed here (see GH#3581)
7071
}
7172
}
7273
}

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/ConnectionPool/WaitHandleDbConnectionPool.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,6 +1072,7 @@ private void WaitForPendingOpen()
10721072
next.UserOptions,
10731073
out connection);
10741074
}
1075+
// @TODO: CER Exception Handling was removed here (see GH#3581)
10751076
catch (Exception e)
10761077
{
10771078
caughtException = e;

0 commit comments

Comments
 (0)