Multimobile Development: Building Applications for any Smartphone
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

Reply to this message...
Vote that this is a GOOD answer...
 
Really good experience at the Apple Store
MonoDroid – looking *awesome*
 
    
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]

Reply to this message...
Vote that this is a GOOD answer...
 
First volume of Multimobile Development nearly ready to go to press
A mention on Developing for the iPhone and Android: The pros and cons
 
    
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]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
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]

Reply to this message...
Vote that this is a GOOD answer...
 
First chapters of Multimobile Development book now available on Apress Alpha program
iPad
 
    
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

Reply to this message...
Vote that this is a GOOD answer...
 
New book project – Multimobile Development: Building Applications for any Smartphone
Dive into HTML5
 
    
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]

Reply to this message...
Vote that this is a GOOD answer...
 
 
    
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]

Reply to this message...
Vote that this is a GOOD answer...
 
Steve Jobs’ thoughtful/thought provoking Thoughts on Flash…
Handy list of countries in CSV format
 
 
System.Exception




Multimobile Development: Building Applications for any Smartphone
Ad
BootFX
Reliable and powerful .NET application framework.
iOS, Android and Windows Phone Development Training and Consultancy
Hosted by RackSRV Communications
 
Multimobile Development: Building Applications for any Smartphone
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734