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

     1  package errcore
     2  
     3  func PathMeaningfulError(
     4  	rawErrType RawErrorType,
     5  	funcName string,
     6  	err error,
     7  	location string,
     8  ) error {
     9  	if err == nil {
    10  		return nil
    11  	}
    12  
    13  	errMsg := err.Error() +
    14  		", location: [" + location + "]"
    15  
    16  	return rawErrType.Error(
    17  		funcName,
    18  		errMsg)
    19  }