views:

46

answers:

2

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 ArgumentException directly. I want to know how I can find where this exception might be thrown from.

+1  A: 

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

Like I said, I've not used this, so feel free to down-vote if you've tried it and it's not useful.

Dave
Does anyone here use this tool?
Rice Flour Cookies
+1  A: 

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

Jason Haley