• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 204
  • Last Modified:

How To Escape an Exception.

Hi all,

           If i know an exception will arise and i want to ignore it, how to do that... ??
 
          do i write anything in the catch block to ignore that exception ??

Thanks
0
letsbedecent
Asked:
letsbedecent
  • 2
  • 2
1 Solution
 
objectsCommented:
you just have an empty catch block
0
 
objectsCommented:
try
{
   doSomethingThatMayCauseAnExcptionImNotInterestedIn();
}
catch (BoringException ex)
{
   // no nothing
}
0
 
letsbedecentAuthor Commented:
but then it is printing the stack trace ... even if i leave the block empty..

I actually want to continue with the execution of the rest of the program
0
 
letsbedecentAuthor Commented:
Oh no it works... thanks...
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.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now