473,396 Members | 1,990 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.

Documentation for Exceptions

Hi everyone,

I tried to find a satisfactory answer for this question before I asked it,
but maybe someone can enlighten me:

How come the MSDN documentation for a particular function that throws an
exception doesn't have that exception listed among its properties, methods,
and events? (I'm sure you know where I'm going with this...)

In Java documentation for their ArrayList for example, you can look at the
..Add method and see clearly that it throws an IndexOutOfBoundsException if
the index is out of range. Perhaps I'm not using the MSDN documentation
correctly, but I have a difficult time finding that kind of information for
VB.NET classes.

I'm attempting to follow the recommendation of not catching System.Exception
every time I do a try...catch, but when I have a couple of method calls
within the block that raise exceptions I don't see easily in the docs, it
makes it a real (and seemingly unnecessary) challenge to do so.

I'm hoping that some of you folks who have been in the .NET world longer
than I would be able to help me out with this problem....

How can you begin to decide whether you SHOULD handle an exception in a code
block when you can't easily find out what exceptions CAN be thrown by that
code?

Thanks in advance for your comments and assistance!
Mike
Mar 17 '06 #1
1 1077
Hello Mike,

Where are you looking at? There are a exception setting for each class member
for example ArrayList.Add http://msdn.microsoft.com/library/de...ssaddtopic.asp

ME> Hi everyone,
ME>
ME> I tried to find a satisfactory answer for this question before I
ME> asked it, but maybe someone can enlighten me:
ME>
ME> How come the MSDN documentation for a particular function that
ME> throws an exception doesn't have that exception listed among its
ME> properties, methods, and events? (I'm sure you know where I'm going
ME> with this...)
ME>
ME> In Java documentation for their ArrayList for example, you can look
ME> at the .Add method and see clearly that it throws an
ME> IndexOutOfBoundsException if the index is out of range. Perhaps I'm
ME> not using the MSDN documentation correctly, but I have a difficult
ME> time finding that kind of information for VB.NET classes.
ME>
ME> I'm attempting to follow the recommendation of not catching
ME> System.Exception every time I do a try...catch, but when I have a
ME> couple of method calls within the block that raise exceptions I
ME> don't see easily in the docs, it makes it a real (and seemingly
ME> unnecessary) challenge to do so.
ME>
ME> I'm hoping that some of you folks who have been in the .NET world
ME> longer than I would be able to help me out with this problem....
ME>
ME> How can you begin to decide whether you SHOULD handle an exception
ME> in a code block when you can't easily find out what exceptions CAN
ME> be thrown by that code?
ME>
ME> Thanks in advance for your comments and assistance! Mike
ME>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Mar 17 '06 #2

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

Similar topics

0
by: Christopher J. Bottaro | last post by:
The MySQLdb (mysql-python) documentation doesn't really cover which functions (methods) throw what exceptions. Where can I find this info? Development is such a pain when unhandled exceptions keep...
75
by: Xah Lee | last post by:
http://python.org/doc/2.4.1/lib/module-re.html http://python.org/doc/2.4.1/lib/node114.html --------- QUOTE The module defines several functions, constants, and an exception. Some of the...
12
by: Fredrik Olsson | last post by:
Hello. For Java there is javadac, for Obj-C headerdoc2html, for C doxygen, and even for good old VB 6 there is VBDox. But I have found no suitable tool for documenting my .net code to get...
12
by: Phill. W | last post by:
Whilst hammering away cutting VB.Net code, I'm hearing (mostly from my C#-cutting colleagues) about XML documentation that can be produced from our .Net projects. Now, I've only scratched the...
62
by: A.M. Kuchling | last post by:
Here are some thoughts on reorganizing Python's documentation, with one big suggestion. The tutorial seems to be in pretty good shape because Raymond Hettinger has been keeping it up to date. ...
40
by: GTi | last post by:
Is there any source code documentation tools available for Visual Studio 2005 ? I have created a LIB that must be documented. Must I do it by hand or is it some kind of tools to pre document my...
10
by: gzinger | last post by:
Since I never seen the following question answered, I am re-posting it: Hi Im using ASP.NET 2 with C# in codebehind files and Visual Studio 2005 Team Edition. I have embedded lots of XML...
0
by: Jason R. Coombs | last post by:
#!python """ In the documentation for __del__ (under Python Language Reference/Data Model), the following warning is indicated: Warning : Due to the precarious circumstances under which...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.