Skip to content

Commit

Permalink
unify sender name for error messages in pongo2 filters
Browse files Browse the repository at this point in the history
  • Loading branch information
sseide committed Feb 22, 2022
1 parent cf8349e commit c48799c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/template/template_filters.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func pongoJSFilter(name string, js string) func(in *pongo2.Value, param *pongo2.
v, err := vm.RunString(js)
if err != nil {
return nil, &pongo2.Error{
Sender: "javascript-filter@" + name,
Sender: "javascript-filter:" + name,
OrigError: err,
}
}
Expand Down Expand Up @@ -135,7 +135,7 @@ func filterToJSON(in *pongo2.Value, param *pongo2.Value) (*pongo2.Value, *pongo2
b, err := json.Marshal(in.Interface())
if err != nil {
return nil, &pongo2.Error{
Sender: "filterToJSON",
Sender: "filter:filterToJSON",
OrigError: err,
}
}
Expand Down Expand Up @@ -226,7 +226,7 @@ func filterUnmarshalYAML(in *pongo2.Value, param *pongo2.Value) (*pongo2.Value,
var ret interface{}
if err := gyml.Unmarshal([]byte(in.String()), &ret); err != nil {
return nil, &pongo2.Error{
Sender: "filterUnmarshalYAML",
Sender: "filter:filterUnmarshalYAML",
OrigError: err,
}
}
Expand Down

0 comments on commit c48799c

Please sign in to comment.