err exception

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
LVL 4
Moizsaif123Asked:
Who is Participating?
 
anarki_jimbelConnect With a Mentor Commented:
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
 
Carl TawnConnect With a Mentor Systems and Integration DeveloperCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.