|
| Try/Catch statements |
|
|
|
|
| Messages |
|
Related Types |
This message was discovered on microsoft.public.dotnet.general.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
| Melissa Whalen |
Does anybody know where I can find a list of all the possible Catch statements and perhaps their definitions?
-- Melissa Whalen, BBA/IS, AIT VS Visual Statement
|
|
|
| |
|
| |
| |
| Melissa Whalen |
Actually let me clarify, I meant to say a list of all of the possible Exceptions that can be caught and their definitions.
"Melissa Whalen" <Click here to reveal e-mail address> wrote in message news:#S5Mrj4cBHA.1680@tkmsftngp04... [Original message clipped]
|
|
|
| |
|
| |
| |
| Josh Mitts \(MVP\) |
Hi Melissa,
No you can't....Exceptions are either one of two things:
(1) Objects of type System.Exception that set their own message information, etc.
(2) Objects of a type that inherits from System.Exception that set their own message information, etc.
There are a limited number of the types mentioned in (2) in the Framework, all of which you can find in the help file (there aren't that many). But all of the exceptions you see are objects of a particular Exception type, some of which may be defined classes in libraries, applications, etc. The only thing you can do is look at the exception's message and related info.
--
Josh Mitts Microsoft .NET MVP (.NET Framework, C#, .NET CF/SDE) Click here to reveal e-mail address http://www.joshmitts.com
"Melissa Whalen" <Click here to reveal e-mail address> wrote in message news:#ruLJp4cBHA.1456@tkmsftngp04... Actually let me clarify, I meant to say a list of all of the possible Exceptions that can be caught and their definitions.
"Melissa Whalen" <Click here to reveal e-mail address> wrote in message news:#S5Mrj4cBHA.1680@tkmsftngp04... [Original message clipped]
|
|
|
| |
|
|
| |
| |
| Melissa Whalen |
Then is there any way to know what the right exception is for individual cases? One that I did find is an SQLException for SQL objects...but other than that. I'm trying to be a little bit specific with my exception handling instead of just using 'catch e as exception'.
"Josh Mitts (MVP)" <Click here to reveal e-mail address> wrote in message news:uVGGgI7cBHA.1988@tkmsftngp02... [Original message clipped]
|
|
|
| |
|
| |
| |
| Len Weaver |
Hello Melissa,
> Then is there any way to know what the right exception is for individual > cases? One that I did find is an SQLException for SQL objects...but other [Original message clipped]
Look for 'System.Exception' in the online help. Near the top of the page you'll see a 'Derived Classes' link. From there you can zero-in one the exception that best meets you needs.
Hope this helps, Len
|
|
|
| |
|
| |
|
|
|
|
| |
| Jay B. Harlow [MVP - Outlook] (VIP) |
Melissa, In addition to Josh's & Len's statements.
You can WinCV.exe in \Program Files\Microsoft.NET\FrameworkSDK\bin to get a list of all 'exceptions' at least classes that have Exception in their names...
Unfortunately you will need to check the docs for each class that you use to find out the exceptions that it throws...
Hope this helps Jay
"Melissa Whalen" <Click here to reveal e-mail address> wrote in message news:#S5Mrj4cBHA.1680@tkmsftngp04... [Original message clipped]
|
|
|
| |
|
|
| |
|
| |
| Melissa Whalen |
Thanks everyone...I found what I needed to know.
"Melissa Whalen" <Click here to reveal e-mail address> wrote in message news:#S5Mrj4cBHA.1680@tkmsftngp04... [Original message clipped]
|
|
|
| |
|
| |
|
|
|
|
|
|
|
|
BootFX
Reliable and powerful .NET application framework. |
|
|
|
|
|
|