For ENG-4262, add exception handling to avoid lost exceptions