0

I'm interested if there is a tool that could list all the custom exceptions the code, down the call stack, can throw?

dragan.stepanovic
  • 2,955
  • 8
  • 37
  • 66

1 Answers1

0

You can open the Object Browser window in VS with your project open. Click on View | Object Browser. In the search bar, type "Exception" and hit enter or click on the magnifying glass. it will filter the list of objects to include only those that have the word "Exception" somewhere in their fully qualified type name.

Edit:

Upon further inspection, it also returns methods and properties that have the word "Exception" in them, but this is free and while it might return more information that you're after, it doesn't miss anything either.

Tony Vitabile
  • 8,298
  • 15
  • 67
  • 123
  • What if they misspelled exception? :) – tsells Feb 19 '14 at 18:02
  • What do you expect from a free tool? :) – Tony Vitabile Feb 19 '14 at 22:31
  • This doesn't help at all. I need to find all the custom exceptions that can be thrown by the client code under a given method. E.g. if I have method `Foo()` which calls several other methods in turn, and some of them can throw some custom defined exceptions, I'd like to list them. I need this in order to be sure that I'm catching all custom exceptions in 'Foo()' since I'd know how to handle them there. – dragan.stepanovic Feb 20 '14 at 09:46