Exception Hunter - 3.0

Exception Hunter

Learning Exception Hunter - 3.0

Analyzing Your Code

To start analyzing your code:

  1. Add the assemblies.

    When you first start Exception Hunter, you need to add the assemblies that you want to analyze. If another assembly is referenced by an added assembly, it is added automatically. Any referenced assembly that cannot be found on your file system is identified as "Not Found"; you can then browse to locate it, or ignore it in the analysis.

  2. Locate the method you want to analyze.

    To select the method you want to analyze, you can search for a method using the Find box, or drill down to view all namespaces, classes, structs, and their methods.

  3. View the results.

    Exceptions are listed by type. You can explore the list of exceptions by selecting an exception type to see all the places in your code that the exception is thrown.

  4. Drill down through the stack trace for the selected exception class.

    To find situations in which the exception may be thrown, view the source code of the method selected in the stack trace.

  5. Adjust the options, if required.

    From the Tools menu, select Options to display the Options dialog box, in which you can set a number of options for how Exception Hunter analyzes your code. For example, you can set the version of the .NET Framework for detecting exceptions, or use a more detailed analysis, which detects more exceptions but can take longer to run. Hints are available for each option in the Options dialog.

Notes

  • Exception Hunter cannot detect exceptions that may be thrown when following delegate calls, for example Event Handler calls.

    You should therefore analyze the target methods for such delegates. We recommend that you wrap any exceptions and throw them as a domain-specific exception type.

  • Static classes appear in the list as abstract sealed classes, as this is how they are represented by the .NET CLR.
  • Runtime Exceptions (other than some NullReferenceExceptions and InvalidCastExceptions) generated by the .NET CLR are not detected by Exception Hunter.

See also

Using the command line

Viewing the results

Working with assemblies

Was this article helpful?

Search support
Forums