gitlab.com/evatix-go/core@v1.3.55/errcore/SimpleHandleErrMany.go (about)

     1  package errcore
     2  
     3  import "gitlab.com/evatix-go/core/constants"
     4  
     5  func SimpleHandleErrMany(msg string, errorItems ...error) {
     6  	if errorItems == nil || len(errorItems) == 0 {
     7  		return
     8  	}
     9  
    10  	singleErr := ManyErrorToSingle(errorItems)
    11  
    12  	if singleErr != nil {
    13  		panic(singleErr.Error() + constants.NewLineUnix + msg)
    14  	}
    15  }