From: Bjørn Erik Pedersen Date: Wed, 11 Jul 2018 09:03:15 +0000 (+0200) Subject: resource: Include the transformation step in the error message X-Git-Tag: v0.44~10 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d96f2a460f58e91d8f6253a489d4879acfec6916;p=brevno-suite%2Fhugo resource: Include the transformation step in the error message Fixes #4924 --- diff --git a/resource/transform.go b/resource/transform.go index 4b6663d0..fcb10143 100644 --- a/resource/transform.go +++ b/resource/transform.go @@ -17,6 +17,7 @@ import ( "bytes" "path" "strconv" + "strings" "github.com/gohugoio/hugo/common/errors" "github.com/gohugoio/hugo/helpers" @@ -389,7 +390,7 @@ func (r *transformedResource) transform(setContent bool) (err error) { // If a prepared bundle for this transformation chain is available, use that. f := r.tryTransformedFileCache(key) if f == nil { - return fmt.Errorf("failed to transform %q (%s): %s", tctx.InPath, tctx.InMediaType.Type(), err) + return fmt.Errorf("%s: failed to transform %q (%s): %s", strings.ToUpper(tr.transformation.Key().name), tctx.InPath, tctx.InMediaType.Type(), err) } transformedContentr = f defer f.Close()