开发者

How can I trace where potential exceptions might be thrown from?

We have many questions here about stack traces and analyzing exceptions that have been thrown.

I am using RedGate Reflector to examine the workings of some .net classes. In particular, I am looking at the ConnectionString property of the System.Data.SqlClient.SqlConnection object. Reflector indicates that this property may throw an ArgumentException if an invalid connection string is supplied.

My question is: given that this property may throw this particular exception, how can I analyze the code to find where the exception might be thrown from? The property calls another function to set the value. This function does not throw the Arg开发者_高级运维umentException directly. I want to know how I can find where this exception might be thrown from.


I haven't used it but you might look at Jason Bock's ExceptionFinder for Reflector


I have never used it before, but I think another Red Gate product, Exception Hunter, is designed to do this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜