-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.Data.SqlClient.SqlInternalConnectionTds constructor purges original call stack when rethrowing an exception #100
Comments
@Dmitry-Me How will replacing |
@saurabh500 The difference will be in the |
It might be nice if it in fact go explicitly rethrown further up. Having it rethrown at the public method that called into this would mean the stack trace went as far as the caller could directly deal with (rather than having to hunt through a trace to find the first point that made sense to them). This cuts out some of that, but not all, and is perhaps falling between the two stools of a trace that is clearer to the caller and a trace that is fully informative. |
As recently announced in the .NET Blog, focus on new SqlClient features an improvements is moving to the new Microsoft.Data.SqlClient package. For this reason, we are moving this issue to the new repo at https://github.com/dotnet/SqlClient. We will still use https://github.com/dotnet/corefx to track issues on other providers like System.Data.Odbc and System.Data.OleDB, and general ADO.NET and .NET data access issues. |
It is important that internal stack information is not destroyed. This is very valuable when guessing the source of bugs. I have never seen code that intentionally deletes part of the stack in order to make it easier to interpret the stack. The entire framework does not do this. This would not be a good choice. |
System.Data.SqlClient.SqlInternalConnectionTds
currently goes like this:throw sqlex
causes original call stack of where the exception was thrown to be lost. If that's what it desired then it should be explained, otherwise just usethrow;
The text was updated successfully, but these errors were encountered: