finished with exception handling