Log caught exceptions.