Updated method of printing exceptions.