throw an exception if parameters that are needed arn't set