throw new Exception("Class is numeric!");
throw new UnsupportedClassTypeException("Class is numeric!");
  public void buildClassifier(Instances data) throws Exception{        ClassifierDecList currentRule;    double currentWeight;    Instances oldGrowData, newGrowData, oldPruneData,      newPruneData;    int numRules = 0;        if (data.classAttribute().isNumeric())      throw new Exception("Class is numeric!");    if (data.checkForStringAttributes()) {      throw new Exception("Can't handle string attributes!");    }        theRules = new Vector();    data = new Instances(data);    data.deleteWithMissingClass();    if (data.numInstances() == 0)      throw new Exception("No training instances/Only instances with missing class!");    if (reducedErrorPruning) {      data.stratify(numSetS);      oldGrowData = data.trainCV(numSetS, numSetS - 1);      oldPruneData = data.testCV(numSetS, numSetS - 1);    } else {      oldGrowData = data;      oldPruneData = null;    }    while (Utils.gr(oldGrowData.numInstances(),0)){      // Create rule      if (reducedErrorPruning) {	currentRule = new PruneableDecList(toSelectModeL,					   minNumObj);	((PruneableDecList)currentRule).buildRule(oldGrowData, 						  oldPruneData);      } else {	currentRule = new C45PruneableDecList(toSelectModeL, CF,					      minNumObj);	((C45PruneableDecList)currentRule).buildRule(oldGrowData);      }      numRules++;      // Remove instances from growing data      newGrowData = new Instances(oldGrowData,					   oldGrowData.numInstances());      Enumeration enum = oldGrowData.enumerateInstances();      while (enum.hasMoreElements()) {	Instance instance = (Instance) enum.nextElement();	currentWeight = currentRule.weight(instance);	if (Utils.sm(currentWeight,1)) {	  instance.setWeight(instance.weight()*(1-currentWeight));	  newGrowData.add(instance);	}      }      newGrowData.compactify();      oldGrowData = newGrowData;            // Remove instances from pruning data      if (reducedErrorPruning) {	newPruneData = new Instances(oldPruneData,					     oldPruneData.numInstances());	enum = oldPruneData.enumerateInstances();	while (enum.hasMoreElements()) {	  Instance instance = (Instance) enum.nextElement();	  currentWeight = currentRule.weight(instance);	  if (Utils.sm(currentWeight,1)) {	    instance.setWeight(instance.weight()*(1-currentWeight));	    newPruneData.add(instance);	  }	}	newPruneData.compactify();	oldPruneData = newPruneData;      }