?
Solved

err exception

Posted on 2014-01-08
2
Medium Priority
?
170 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

765 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