Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

err exception

Posted on 2014-01-08
2
Medium Priority
?
174 Views
Last Modified: 2014-02-04
There is an attachement below showing an error and i want to catch that specific exception when it errors and bypass it...how do i catch or trap the exception
Ex.docx
0
Comment
Question by:Moizsaif123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Assisted Solution

by:Carl Tawn
Carl Tawn earned 1000 total points
ID: 39764968
You simply use multiple exception handlers - most specific first:
try
{
   ...
}
catch (InvalidOperationException)
{
   // do something with specific exception
}
catch (Exception ex)
{
    // do something with more general exception
}

Open in new window

0
 
LVL 30

Accepted Solution

by:
anarki_jimbel earned 1000 total points
ID: 39766563
The answer is given but I'd also recommend to read MSDN documentation on exception handling. It will help a lot in future:

http://msdn.microsoft.com/en-us/library/0yd65esw.aspx
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question