From: Bjørn Erik Pedersen Date: Mon, 16 Jul 2018 08:42:07 +0000 (+0200) Subject: resource/bundler: Improve error message X-Git-Tag: v0.45~35 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4c240800a4275244c9e0847cd6707383180f1ac3;p=brevno-suite%2Fhugo resource/bundler: Improve error message --- diff --git a/resource/bundler/bundler.go b/resource/bundler/bundler.go index b9cd718d..4b1718b0 100644 --- a/resource/bundler/bundler.go +++ b/resource/bundler/bundler.go @@ -15,7 +15,6 @@ package bundler import ( - "errors" "fmt" "io" "path/filepath" @@ -71,7 +70,7 @@ func (c *Client) Concat(targetPath string, resources resource.Resources) (resour // We may improve on that in the future, but then we need to know more. for i, r := range resources { if i > 0 && r.MediaType().Type() != resolvedm.Type() { - return nil, errors.New("resources in Concat must be of the same Media Type") + return nil, fmt.Errorf("resources in Concat must be of the same Media Type, got %q and %q", r.MediaType().Type(), resolvedm.Type()) } resolvedm = r.MediaType() }