mirror of
https://git.sr.ht/~sircmpwn/aerc
synced 2026-01-29 19:08:02 +01:00
templates: better error message
This commit is contained in:
parent
f6a0eb8e14
commit
a9ae91c2d8
@ -2,7 +2,7 @@ package templates
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/mail"
|
||||
"os"
|
||||
@ -190,7 +190,8 @@ func findTemplate(templateName string, templateDirs []string) (string, error) {
|
||||
return templateFile, nil
|
||||
}
|
||||
|
||||
return "", errors.New("Can't find template - " + templateName)
|
||||
return "", fmt.Errorf(
|
||||
"Can't find template %q in any of %v ", templateName, templateDirs)
|
||||
}
|
||||
|
||||
func ParseTemplateFromFile(templateName string, templateDirs []string, data interface{}) (io.Reader, error) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user