09 January 2006

Adding your own .NET exceptions to Visual Studio

You can easily add your own exceptions into Visual Studio so that you do not need to add them in each time into your project when debugging your code.

I have only checked this against Visual Studio 2003, but it looks like it would works the same in Visual Studio 2000 and Visual Studio 2005. BR>Start up regedit and go to


add in the new Folder, eg MyCustomExceptions. Add in two DWORD keys, State and Code. Now add in the new exceptions as folders each with their own keys of State and Code.
Here is an example registry exported file for two exceptions generated by the ANTLR system…

For more articles like this, sign up to the fortnightly Simple-Talk newsletter.


  • Rate
    [Total: 0    Average: 0/5]

David Connell is a Software Developer who led the team that created the SQL Data Generator at Red-Gate. Before then, he led the 'SQL Toolbelt' installer and the SQL Doc team, and before that worked in the SQL Bundle 5.0 team. He was previously a Senior Software engineer at Pi Research. In his spare time David Connell develops other software packages with a Dutch Company, Thermimport Quality Control.

View all articles by David Connell