MCPcopy
hub / github.com/flosch/pongo2 / updateFromTokenIfNeeded

Method updateFromTokenIfNeeded

error.go:25–39  ·  view source on GitHub ↗
(template *Template, t *Token)

Source from the content-addressed store, hash-verified

23}
24
25func (e *Error) updateFromTokenIfNeeded(template *Template, t *Token) *Error {
26 if e.Template == nil {
27 e.Template = template
28 }
29
30 if e.Token == nil {
31 e.Token = t
32 if e.Line <= 0 {
33 e.Line = t.Line
34 e.Column = t.Col
35 }
36 }
37
38 return e
39}
40
41// Returns a nice formatted error string.
42func (e *Error) Error() string {

Callers 5

ExecuteMethod · 0.95
tagIncludeParserFunction · 0.80
callMethod · 0.80
tagImportParserFunction · 0.80
tagSSIParserFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected