Let's just catch the Exception type here to avoid duplication.