MCPcopy
hub / github.com/rgburke/grv / GenerateExpressionError

Function GenerateExpressionError

cmd/grv/expression_processor.go:301–308  ·  view source on GitHub ↗

GenerateExpressionError generates an error with expression position information included

(expression Expression, errorMessage string, args ...interface{})

Source from the content-addressed store, hash-verified

299
300// GenerateExpressionError generates an error with expression position information included
301func GenerateExpressionError(expression Expression, errorMessage string, args ...interface{}) error {
302 var buffer bytes.Buffer
303
304 buffer.WriteString(fmt.Sprintf("%v:%v: ", expression.Pos().line, expression.Pos().col))
305 buffer.WriteString(fmt.Sprintf(errorMessage, args...))
306
307 return errors.New(buffer.String())
308}
309
310// ConvertTypes defers the call to the child expression if it is a logical expression
311func (parenExpression *ParenExpression) ConvertTypes(fieldTypeDescriptor FieldTypeDescriptor) (errors []error) {

Callers 7

ValidateMethod · 0.85
ValidateMethod · 0.85
ValidateMethod · 0.85
processDateComparisonMethod · 0.85
processGlobComparisonMethod · 0.85
ValidateMethod · 0.85

Calls 2

PosMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected