how nested try catch block works