MCPcopy Index your code
hub / github.com/rilldata/rill / replaceResourceWithError

Method replaceResourceWithError

runtime/parser/parser.go:1005–1011  ·  view source on GitHub ↗

replaceResourceWithError removes a resource from the parser's internal state and adds a parse error for its paths instead.

(n ResourceName, err error, external bool)

Source from the content-addressed store, hash-verified

1003
1004// replaceResourceWithError removes a resource from the parser's internal state and adds a parse error for its paths instead.
1005func (p *Parser) replaceResourceWithError(n ResourceName, err error, external bool) {
1006 r := p.Resources[n.Normalized()]
1007 p.deleteResource(r)
1008 for _, path := range r.Paths {
1009 p.addParseError(path, err, external)
1010 }
1011}
1012
1013// addParseError adds a parse error to the p.Errors
1014func (p *Parser) addParseError(path string, err error, external bool) {

Callers 1

parsePathsMethod · 0.95

Calls 3

deleteResourceMethod · 0.95
addParseErrorMethod · 0.95
NormalizedMethod · 0.80

Tested by

no test coverage detected