Solved

err exception

Posted on 2014-01-08
2
155 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
2 Comments
 
LVL 52

Assisted Solution

by:Carl Tawn
Carl Tawn earned 250 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 29

Accepted Solution

by:
anarki_jimbel earned 250 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How do I bind the results to a grid 3 24
Image(7) 1 37
Iterate two lists and remove inactive 11 38
Entity Framework 3 14
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now