hugo/docs/content/en/functions/fmt/Errorf.md
Bjørn Erik Pedersen 5fd1e74903
Merge commit '9b0050e9aabe4be65c78ccf292a348f309d50ccd' as 'docs'
```
git subtree add --prefix=docs/ https://github.com/gohugoio/hugoDocs.git master --squash
```

Closes #11925
2024-01-27 10:48:57 +01:00

679 B

title description categories keywords action aliases
fmt.Errorf Log an ERROR from a template.
aliases related returnType signatures
errorf
functions/fmt/Erroridf
functions/fmt/Warnf
string
fmt.Errorf FORMAT [INPUT]
/functions/errorf

{{% include "functions/fmt/_common/fmt-layout.md" %}}

The errorf function evaluates the format string, then prints the result to the ERROR log and fails the build.

{{ errorf "The %q shortcode requires a src parameter. See %s" .Name .Position }}

Use the erroridf function to allow optional suppression of specific errors.