Exception Hunter 1.0

Build Bug-free .NET Applications

Anand Narayanaswamy

October 30, 2009

4 Min Read
ITPro Today logo in a gray background | ITPro Today

asp:review

 

Exception Hunter 1.0

Build Bug-free .NET Applications

 

By Anand Narayanaswamy

 

Building a software or Web application requires the effortof many developers and it is the responsibility of the concerned developer tohandle exceptions during the coding phase. Otherwise, runtime errors will occurand it will affect the credibility of not only the product but also of thecompany that developed it. It is not necessary to handle all exceptions thatmay be thrown by the application being developed but there are some hiddenexceptions that might occur without your knowledge, thus resulting in an applicationcrash. For instance, if you develop a program that attempts to connect to a SQLdatabase, then you may not know that if one of the SQL libraries that relies onreading information from the computer registry fails, the application willthrow an IOException resulting in fatal errors. As a developer, you shouldhandle these kinds of exceptions; for this purpose you need a reliable tool toanalyze the application.

 

UK-based Red Gate Software s Exception Hunter rapidlyscans a .NET runtime assembly file and listsin a meaningful manner all possible exceptions that can target the functionsused. Even though the product pinpoints all unhandled exceptions, it is up toyou as a developer to decide which to handle and which to not handle. A fullyfunctional trial version of Exception Hunter can be downloaded from the RedGate Web site after completing a simple registration process (http://www.red-gate.com/products/exception_hunter/index.htm).I found the installation file of another product inside the downloaded package.I guess it was included as part of the .NETbundle, but I d prefer to download each product separately. I recommend thatRed Gate distribute the installation packages separately and as a .NET bundle so userscan download the required product(s) according to their tastes and preferences.

 

To work with Exception Hunter you first must locate the .NETassembly file and add it by clicking the Add Assembly option on the toolbar.

 


Figure 1: Adding assemblies.

 

Then you can either search for a method or navigatethrough to view all namespaces, classes, and their methods.

 


Figure 2: Navigating methods.

 

The final step is to view the stack trace by selecting aspecific exception class.

 


Figure 3: Viewing the stack trace.

 

The product highlights the specific line in the code fileon which the exception will probably be thrown. You can then directly openVisual Studio 2005 from within the interface of the product and write thespecific code to handle the required exception. However, this feature will beavailable only if the assembly has an associated PDB file. A notable feature ofthe product is that it is compatible with .NETFramework 1.1, 2.0, 3.0, and 3.5 (the default is 2.0). The versions can easily bemodified from the Tools menu. Red Gate is planning to add Intermediate Language(IL) view inside the product for the benefit of advanced developers.

 

Exception Hunter includes a powerful AJAX-based searchfunctionality that you can use to locate a specific class or method. I feelthis feature will be very useful for developers who analyze large applications.Moreover, the product enables you to perform all the tasks from the command line.I feel the information you gather from this tool will be extremely useful becauseVisual Studio 2005 doesn t have any tool similar to Exception Hunter.

 

Red Gate provides Web-based documentation, which can beaccessed by hitting the F1 key after the launch of the product. The help fileis also available CHM format from http://www.red-gate.com/support/Exception_Hunter/index.htm.A detailed step-by-step walkthrough with relevant screenshots and explanationscan be viewed at http://www.red-gate.com/products/exception_hunter/walkthrough.htm.Alternatively, you can also watch an online audio-enabled demonstration at http://www.red-gate.com/products/exception_hunter/video.htm.I was able to understand the core features and the working of the productwithin minutes of installation after I watched the demo video.

 

Red Gate has developed the product for the benefit of bothWindows and ASP.NET developers. But as compilation is dynamic from .NETFramework 2.0 onwards, you must locate the DLL file from the Temporary ASP.NETfiles folder. I suggest you pre-compile the ASP.NET code into a free-standingDLL, but it will be a complicated process as you must make use of the command-lineoptions. I suggest that Red Gate develop a tool to simplify this step in thenext build of the product.

 

I found that the initial loading time of Exception Hunteris slow, even though I tested it on a system with 512 MB RAM.Red Gate recommends 1 GB, but it is not always possible for all developers tohave a system with this much memory. I hope they ll look into this aspectduring the release of the next build of the product.

 

Exception Hunter will be useful for software testers,engineers, and quality assurance managers, as it will help them immensely towardtheir quest to build bug-free .NET applications for their customers.

 

Anand Narayanaswamy,a Microsoft Most Valuable Professional (MVP), works as an independentconsultant based in Trivandrum, India.Anand also works as chief technical editor for http://ASPAlliance.com.He is the author of Community Server Quickly(http://www.packtpub.com/community-server/book).He runs http://www.learnxpress.com, http://www.dotnetalbum.com/, http://www.csharpfaq.com, http://www.computerbookreviews.org,and http://www.devreviews.com. Findout more about him at http://www.visualanand.net.He can be reached at mailto:[email protected].

 

Rating:

Web Site: http://www.red-gate.com/products/exception_hunter/index.htm

Price: US$295

 

 

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like