I am confused that how to use try-catch best way. Say I am using it in my one method. Then I have options like. 1. Write whole function in one try-catch block. 2. Write many try-catch blocks and group few sentences. 3. Write one try catch block for whole code and use other try-catch in side of outer try-catch blocks. That is nested try-catch blocks. And suppose I want to close my file before returning from function. I can write close file statement in finally block. But here again I have to write try-catch because close file throws exception. How to deal with this? Thank you very much in advance.