throw exception if no host is specified