2017-07-12 13:07:57 +02:00
|
|
|
package render
|
|
|
|
|
|
|
|
import (
|
2022-01-06 18:43:17 +01:00
|
|
|
"github.com/danog/liquid/parser"
|
2017-07-12 13:07:57 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// An Error is an error during template rendering.
|
|
|
|
type Error interface {
|
2017-07-12 13:12:14 +02:00
|
|
|
Path() string
|
2017-07-12 13:07:57 +02:00
|
|
|
LineNumber() int
|
|
|
|
Cause() error
|
|
|
|
Error() string
|
|
|
|
}
|
|
|
|
|
|
|
|
func renderErrorf(loc parser.Locatable, format string, a ...interface{}) Error {
|
|
|
|
return parser.Errorf(loc, format, a...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func wrapRenderError(err error, loc parser.Locatable) Error {
|
|
|
|
return parser.WrapError(err, loc)
|
|
|
|
}
|