Error in R training model

I have made a training model.
Create utility function

rpart.cv<- function(seed, training, lbls, ctrl){
  cl<- makeCluster(6,'SOCK')
  registerDoSNOW(cl)
  
  set.seed(seed)
  #Training formula
  rpart.cv<- train(x=training, y=lbls, method= 'rpart', tunelength=30,
                   trControl=ctrl)
  
  #Shutdown cluster
  stopCluster(cl)
  
  return(rpart.cv)
}


# Grab features
features<- c('Pclass','Title','Family.size')
rpart.train.1<- data.combined[1:891, features]

# Run CV and check out results
rpart.1.cv.1<- rpart.cv(94622,rpart.train.1,rf.label,ctrl.3)

but its showing an error.

Something is wrong; all the Accuracy metric values are missing:
    Accuracy       Kappa    
 Min.   : NA   Min.   : NA  
 1st Qu.: NA   1st Qu.: NA  
 Median : NA   Median : NA  
 Mean   :NaN   Mean   :NaN  
 3rd Qu.: NA   3rd Qu.: NA  
 Max.   : NA   Max.   : NA  
 NA's   :3     NA's   :3    
Error: Stopping
In addition: Warning message:
In nominalTrainWorkflow(x = x, y = y, wts = weights, info = trainInfo,  :

Hide Traceback

Rerun with Debug

 Error: Stopping 
4.
stop("Stopping", call. = FALSE) 
3.
train.default(x = training, y = lbls, method = "rpart", tunelength = 30, 
    trControl = ctrl) 
2.
train(x = training, y = lbls, method = "rpart", tunelength = 30, 
    trControl = ctrl) 
1.
rpart.cv(94622, rpart.train.1, rf.label, ctrl.3) 

Can anyone help to rectify it?

Can you please provide a minimal reprex (reproducible example)? The goal of a reprex is to make it as easy as possible for me to recreate your problem so that I can fix it: please help me help you!

If you've never heard of a reprex before, start by reading "What is a reprex", and follow the advice further down that page.