G
Guest
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
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