Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Updated 19-Mar-13 1:11am
v2
Comments
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?
ZurdoDev 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.

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.
 
Share this answer
 
Hi,
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.

Regards
Jegan
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900