how to handle many more exceptions
I have some piece of code. In that there are chances to get many number of exceptions. My doubt is, to handle all those exceptions do i have to write catch blocks for each type of exception. Is it an efficient way or not. Except using throws keyword, If any other solutions are there please suggest me to do that. Any response will be appreciated.
Thanks in advance
Re: how to handle many more exceptions
What you could do is put exception blocks for "special" exceptions, and then a generic exception block which catches Exceptions (the base class of all exceptions). Also, you can put multiple "catch" blocks with one try block.