From a6a3c3faf9dd4e25393e260911cbc737b9cd0c33 Mon Sep 17 00:00:00 2001 From: lintaba <375078+lintaba@users.noreply.github.com> Date: Thu, 18 Aug 2022 15:53:08 +0200 Subject: [PATCH] More descriptive `not implemented` stubs #2327 --- plugin/resolvergen/resolver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/resolvergen/resolver.go b/plugin/resolvergen/resolver.go index c2a8a285c93..aa3be72739e 100644 --- a/plugin/resolvergen/resolver.go +++ b/plugin/resolvergen/resolver.go @@ -120,7 +120,7 @@ func (m *Plugin) generatePerSchema(data *codegen.Data) error { implementation := strings.TrimSpace(rewriter.GetMethodBody(structName, f.GoFieldName)) comment := strings.TrimSpace(strings.TrimLeft(rewriter.GetMethodComment(structName, f.GoFieldName), `\`)) if implementation == "" { - implementation = `panic(fmt.Errorf("not implemented"))` + implementation = fmt.Sprintf("panic(fmt.Errorf(\"not implemented: %v - %v\"))", f.GoFieldName, f.Name) } if comment == "" { comment = fmt.Sprintf("%v is the resolver for the %v field.", f.GoFieldName, f.Name)