Exception Helper for VS 2005

Posted Mon, Jul 17 2006 3:43 by bill

today I updated the open source Exception Helper plugin for Visual Studio 2005.  You can view a short screen cast demonstrating it's installation and usage (about 4 minutes)

You can download from workspaces.gotdotnet.com/project42

Filed under: ,

Comments

# re: Exception Helper for VS 2005

Tuesday, July 18, 2006 1:22 AM by David Gardiner

Bill,
i had the Refactor for VB 2005 installed, but that only comes with DXcore 1.2

I needed to install the latest version 2.01 to get your extension working.

-dave

# re: Exception Helper for VS 2005

Tuesday, July 18, 2006 11:19 AM by Michael Kennedy

Very nice, thanks!

Any chance of using reflection to determine all exceptions, even the undocumented ones? With the new .NET 2.0 reflection API, it's probably possible, but I don't know how hard.

Thanks,
Michael

# re: Exception Helper for VS 2005

Tuesday, July 18, 2006 4:05 PM by Alex Hoffman

What a great utility! Many thanks.

# re: Exception Helper for VS 2005

Tuesday, July 18, 2006 9:05 PM by bill

Hi Dave,

Yes, it's only designed for DXCore 2.0.  that's a major version upgrade, so I went with supporting jsut the one flavour.  It was originally written against 1.2, so should probably work there, except you'd have ot manually install.
The new version of Refactor for VB (that uses DXCore) should be available very soon :)  The Pro version has already been released.

# re: Exception Helper for VS 2005

Tuesday, July 18, 2006 9:05 PM by bill

Thanks Alex :)

# re: Exception Helper for VS 2005

Tuesday, July 18, 2006 9:15 PM by bill

Hi Michael,

the concept of using static code analysis was considered.  It does however get very complex as you need to walk down every method call, determine what exceptions can be raised, what are handled, and whether or not any handling is conditional.  It's a lot of work, and would most likely end in false positives. (at least that'd be better than omitting exceptions <g>)

But even if we did that, and we then got a list of exceptions, you really have to ask what value is that to the user if there is no documentation as to why those exceptions might be raised.  

For example, let's say you call method
Foo(a,b,c,d)
Which we determine somehwere in the code graph throws an ArguementNullException.  how much use to you is that, unless we tell you whether it's a, b, c and/or d that applies to ?  and what if the ArguementNullException is thrown by a method that Foo calls, and is not directly linked to a, b, c or d.

So at the end of the day, I think what you really need is the documentation.  so that's why we went the easy route of using the XML documentation, as it is also really the best route ;)

# Exception Helper for VS 2005

Friday, July 21, 2006 4:00 AM by Stuart Radcliffe

Exception Helper plugin for Visual Studio 2005. You can view a short screen cast demonstrating it's installation and usage.

# Wyjątkowe narzędzie?

Friday, July 21, 2006 4:40 PM by dotnet

Decyzję o przydatności tego niewielkiego rozszerzenia dla Visual Studio pozostawiam Wam, drodzy Czytelnicy....

# re: Exception Helper for VS 2005

Monday, July 24, 2006 6:41 PM by Michael Kennedy

Bill,

I suppose that it is slightly more complicated than just detecting the throwing of certain exception types - they could be caught and re-thrown as inner exceptions as you suggested.

I see the documentation choice for Framework code with good docs - that's much better than what we've got so far.

Thanks again,
Michael