Improve work with exception