Click here to Skip to main content
11,641,708 members (54,603 online)
Rate this: bad
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 18-Mar-13 23:49pm
Edited 19-Mar-13 1:11am
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
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
0 Mika Wendelius 260
1 DamithSL 248
2 Afzaal Ahmad Zeeshan 129
3 OriginalGriff 120
4 Sergey Alexandrovich Kryukov 80
0 Mika Wendelius 460
1 OriginalGriff 265
2 DamithSL 258
3 CPallini 169
4 Afzaal Ahmad Zeeshan 149

Advertise | Privacy | Mobile
Web01 | 2.8.150731.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