ref: d96f2a460f58e91d8f6253a489d4879acfec6916
parent: ac53035030dff7d9e33cd22c33d915f6d1b5ef8b
author: Bjørn Erik Pedersen <[email protected]>
date: Wed Jul 11 07:03:15 EDT 2018
resource: Include the transformation step in the error message Fixes #4924
--- a/resource/transform.go
+++ b/resource/transform.go
@@ -17,6 +17,7 @@
"bytes"
"path"
"strconv"
+ "strings"
"github.com/gohugoio/hugo/common/errors"
"github.com/gohugoio/hugo/helpers"
@@ -389,7 +390,7 @@
// 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()