When it is required to handle exception inside the same function(where exception arised) and inside the calling place ?
......... //Exception arised
Excp e=new Excp();
Under no circumstances should you ever have an empty catch block. Never. Even if you need to "eat" the exception under rare circumstances, there should be a long comment explaining why there is an empty catch block.
But to answer the general question, you only catch an exception at a level that you have something useful to do with it.
Or, to give the another answer to your original question: never.
If you throw any Exception in any method, you should pass that back to the calling method as a signal that something has gone wrong. Throwing an Exception and catching it in the same method is simply an expensive way to write if‑else.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: when it is required to handle exception inside the function ?