Adapted to new way of printing exceptions