MCPcopy Create free account
hub / github.com/cel-expr/cel-go / ErrorRecoveryLimit

Function ErrorRecoveryLimit

parser/options.go:68–76  ·  view source on GitHub ↗

ErrorRecoveryLimit limits the number of attempts the parser will perform to recover from an error.

(limit int)

Source from the content-addressed store, hash-verified

66
67// ErrorRecoveryLimit limits the number of attempts the parser will perform to recover from an error.
68func ErrorRecoveryLimit(limit int) Option {
69 return func(opts *options) error {
70 if limit < -1 {
71 return fmt.Errorf("error recovery limit must be greater than or equal to -1: %d", limit)
72 }
73 opts.errorRecoveryLimit = limit
74 return nil
75 }
76}
77
78// ErrorReportingLimit limits the number of syntax error reports before terminating parsing.
79//

Callers 8

configureMethod · 0.92
parser_test.goFile · 0.85
TestParserOptionErrorsFunction · 0.85
TestErrorRecoveryLimitsFunction · 0.85
BenchmarkParseFunction · 0.85
BenchmarkParseParallelFunction · 0.85
newTestParserFunction · 0.85

Calls

no outgoing calls

Tested by 5

TestParserOptionErrorsFunction · 0.68
TestErrorRecoveryLimitsFunction · 0.68
BenchmarkParseFunction · 0.68
BenchmarkParseParallelFunction · 0.68
newTestParserFunction · 0.68