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

Struct Error

error.go:15–23  ·  view source on GitHub ↗

The Error type is being used to address an error during lexing, parsing or execution. If you want to return an error object (for example in your own tag or filter) fill this object with as much information as you have. Make sure "Sender" is always given (if you're returning an error within a filter,

Source from the content-addressed store, hash-verified

13// a filter, make Sender equals 'filter:yourfilter'; same goes for tags: 'tag:mytag').
14// It's okay if you only fill in ErrorMsg if you don't have any other details at hand.
15type Error struct {
16 Template *Template
17 Filename string
18 Line int
19 Column int
20 Token *Token
21 Sender string
22 OrigError error
23}
24
25func (e *Error) updateFromTokenIfNeeded(template *Template, t *Token) *Error {
26 if e.Template == nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected