473,396 Members | 2,036 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Standard Exceptions... where to find them

Where can I find a list of pre-defined exceptions for .NET?
Whenever possible, I'd rather use existing exception constants rather than
defining my own, unless no suitable one has been predefined.

Any help would be greatly appreciated.

-- Hans De Schrijver
Nov 16 '05 #1
5 8676
Hans De Schrijver wrote:
Where can I find a list of pre-defined exceptions for .NET?
Whenever possible, I'd rather use existing exception constants rather
than defining my own, unless no suitable one has been predefined.


Exceptions are objects, not values.

It is recommended that you either forward the exception you've caught or
wrap it in a new ApplicationException.

--
"It's beauty that captures your attention; personality which captures
your heart."
Nov 16 '05 #2
I understand that.
However, what I'm looking for is a list of standard pre-defined errors, like
System.DivideByZeroException, System.ArithmeticException and so on.

-- Hans De Schrijver
"Frank Oquendo" <fo******@cadvisions.com> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hans De Schrijver wrote:
Where can I find a list of pre-defined exceptions for .NET?
Whenever possible, I'd rather use existing exception constants rather
than defining my own, unless no suitable one has been predefined.


Exceptions are objects, not values.

It is recommended that you either forward the exception you've caught or
wrap it in a new ApplicationException.

--
"It's beauty that captures your attention; personality which captures
your heart."

Nov 16 '05 #3
Hans,
I normally goto the MSDN library to find all the classes in .NET.

http://msdn.microsoft.com/library/de...pref_start.asp

There are no "exception constants", unless you mean the COM interop HR
values.

However! if you would like to get all the Exception classes, I normally
start with System.Exception, then click on Derived classes, then click on
those derived classes and so on.

http://msdn.microsoft.com/library/de...ClassTopic.asp

Tools such as WinCV (from the .NET SDK) are also useful to search for
classes with Exception in the name.

Hope this helps
Jay
"Hans De Schrijver" <ha**@punctualgraphics.com> wrote in message
news:WL****************@fe2.texas.rr.com...
Where can I find a list of pre-defined exceptions for .NET?
Whenever possible, I'd rather use existing exception constants rather than
defining my own, unless no suitable one has been predefined.

Any help would be greatly appreciated.

-- Hans De Schrijver

Nov 16 '05 #4
Thanks Jay... that's a great starting point.

-- Hans
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> wrote in message
news:O9**************@TK2MSFTNGP12.phx.gbl...
Hans,
I normally goto the MSDN library to find all the classes in .NET.

http://msdn.microsoft.com/library/de...pref_start.asp
There are no "exception constants", unless you mean the COM interop HR
values.

However! if you would like to get all the Exception classes, I normally
start with System.Exception, then click on Derived classes, then click on
those derived classes and so on.

http://msdn.microsoft.com/library/de...ClassTopic.asp
Tools such as WinCV (from the .NET SDK) are also useful to search for
classes with Exception in the name.

Hope this helps
Jay
"Hans De Schrijver" <ha**@punctualgraphics.com> wrote in message
news:WL****************@fe2.texas.rr.com...
Where can I find a list of pre-defined exceptions for .NET?
Whenever possible, I'd rather use existing exception constants rather than defining my own, unless no suitable one has been predefined.

Any help would be greatly appreciated.

-- Hans De Schrijver


Nov 16 '05 #5
Frank Oquendo <fo******@cadvisions.com> wrote:
Hans De Schrijver wrote:
Where can I find a list of pre-defined exceptions for .NET?
Whenever possible, I'd rather use existing exception constants rather
than defining my own, unless no suitable one has been predefined.


Exceptions are objects, not values.

It is recommended that you either forward the exception you've caught or
wrap it in a new ApplicationException.


Not if it makes sense as one of the system exceptions.

ApplicationException is being advised *against* from Whidbey onwards
anyway, I believe - basically no-one's found it particularly useful.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: dkcpub | last post by:
I'm very new to Python, but I couldn't find anything in the docs or faq about this. And I fished around in the IDLE menus but didn't see anything. Is there a tool that can determine all the...
26
by: OvErboRed | last post by:
I just read a whole bunch of threads on microsoft.public.dotnet.* regarding checked exceptions (the longest-running of which seems to be <cJQQ9.4419 $j94.834878@news02.tsnz.net>. My personal...
29
by: David Eng | last post by:
In replying to P.J. Plauger (...
50
by: strutsng | last post by:
I want if "a C program is a standard C++ program, but not vice versa" is a correct statement? In a C++ program, we can use standard C libraries. However, we cannot use C++ libraries inside C...
8
by: cat | last post by:
I had a long and heated discussion with other developers on my team on when it makes sense to throw an exception and when to use an alternate solution. The .NET documentation recommends that an...
32
by: toolmaster | last post by:
Since many of the modern computer languages have built-in namespace features, I can't understand why not add this feature into standard C. I've heard many people complain of the lacking of...
1
by: Anonieko | last post by:
Understanding and Using Exceptions (this is a really long post...only read it if you (a) don't know what try/catch is OR (b) actually write catch(Exception ex) or catch{ }) The first thing I...
10
by: John Nagle | last post by:
Here are three network-related exceptions. These were caught by "except" with no exception type, because none of the more specific exceptions matched. This is what a traceback produced: 1....
26
by: Rick | last post by:
I'm told that "#pragma once" has made it into the ISO standard for either C or C++. I can't find any reference to that anywhere. If it's true, do any of you have a reference I can use? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.