summaryrefslogtreecommitdiffstats
path: root/tpl/tplimpl
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-15 11:40:34 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2022-05-15 20:25:25 +0200
commitfc9f315d86e1fe51c3d1eec3b60680113b2e3aa6 (patch)
tree69e8ffc4d84e8f02e0e6f098c27cda9dd3bcc544 /tpl/tplimpl
parent4b189d8fd93d3fa326b31d451d5594c917e6c714 (diff)
Improve SASS errors
Fixes #9897
Diffstat (limited to 'tpl/tplimpl')
-rw-r--r--tpl/tplimpl/template.go2
-rw-r--r--tpl/tplimpl/template_errors.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/tpl/tplimpl/template.go b/tpl/tplimpl/template.go
index 42a324e9c..c79605cbc 100644
--- a/tpl/tplimpl/template.go
+++ b/tpl/tplimpl/template.go
@@ -554,7 +554,7 @@ func (t *templateHandler) addFileContext(templ tpl.Template, inerr error) error
}
defer f.Close()
- fe := herrors.NewFileError(inErr, info.realFilename)
+ fe := herrors.NewFileErrorFromName(inErr, info.realFilename)
fe.UpdateContent(f, lineMatcher)
if !fe.ErrorContext().Position.IsValid() {
diff --git a/tpl/tplimpl/template_errors.go b/tpl/tplimpl/template_errors.go
index a444899aa..ac8a72df5 100644
--- a/tpl/tplimpl/template_errors.go
+++ b/tpl/tplimpl/template_errors.go
@@ -53,7 +53,7 @@ func (t templateInfo) resolveType() templateType {
func (info templateInfo) errWithFileContext(what string, err error) error {
err = fmt.Errorf(what+": %w", err)
- fe := herrors.NewFileError(err, info.realFilename)
+ fe := herrors.NewFileErrorFromName(err, info.realFilename)
f, err := info.fs.Open(info.filename)
if err != nil {
return err