Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Exception
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
RyanDev129.8K
v2
Comments
Richard MacCutchan at 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 at 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
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  
Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 5,130
1 DamithSL 4,237
2 Maciej Los 3,700
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,846


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 19 Mar 2013
Copyright © CodeProject, 1999-2014
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