try-catch-finally refactored.