Click here to Skip to main content
11,935,053 members (55,015 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# Exceptions
Where can I find list of all the system exceptions occurred in C#?

I want to make an inventory of all the system exceptions occurred in C# so that I have the corresponding custom messages. Please help me out by mentioning any site or anything.
Posted 19-Mar-13 0:49am
Edited 19-Mar-13 2:11am
Richard MacCutchan 19-Mar-13 5:58am
As far as I am aware there is no such list published by Microsoft, but you could try looking. Have you tried Google?
ryanb31 19-Mar-13 7:12am
All? I would suggest you rethink your strategy and just handle the ones you think your app may get. The list, if there is a single list, is way too long.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If you are working on Visual Studio, Under the "Debug" Menu, there is a menu item called "Exceptions" short cut "Ctrl+D,E". if you open this window you will see number of exceptions as a tree list. these exception are used in the VS during debugging to catch a specific exception.

You can look at this list and make a exception list for yourself, however it will be pointless, because it is very unlikely that you will be using all code path in the "Systems" reference to throw all the possible exception. you can always catch the general exception and look the inner exception message for more meaning full text.

I hope this helps.

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Because exception classes can be custom defined for each specific purpose, there's no way that there can be a complete master list of exceptions in C#.

For a list of a bunch of them, open Visual Studio, and press Ctrl+Alt+E, and expand "Common Language Runtime Exceptions". That'll give you a list of the ones currently referenced by your project.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 19 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100