aboutsummaryrefslogtreecommitdiff
path: root/cmd/internal
diff options
context:
space:
mode:
authorJonathan Amsterdam <jba@google.com>2020-12-17 12:58:21 -0500
committerJonathan Amsterdam <jba@google.com>2020-12-17 22:59:01 +0000
commitae2dc097c1f0638e83a51cb50c8e20d787272cd7 (patch)
tree8b4df5b41aed873902ce384e238aa2ab56af404d /cmd/internal
parent52c7381274d540b976a13c922ff48a84ee0b438d (diff)
downloadgo-x-pkgsite-ae2dc097c1f0638e83a51cb50c8e20d787272cd7.tar.xz
internal/derrors,etc.: report errors lower in the stack
The data we get from the errorreporting API isn't too useful because the call to Report happens high on the stack. Try to call Report closer to where the error happens. Change-Id: I101fb4de0892c5d9967f6eb46d7c9cbd72fb567e Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/278952 Trust: Jonathan Amsterdam <jba@google.com> Trust: Julie Qiu <julie@golang.org> Run-TryBot: Jonathan Amsterdam <jba@google.com> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'cmd/internal')
-rw-r--r--cmd/internal/cmdconfig/cmdconfig.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/internal/cmdconfig/cmdconfig.go b/cmd/internal/cmdconfig/cmdconfig.go
index d1fe612a..e9d915b6 100644
--- a/cmd/internal/cmdconfig/cmdconfig.go
+++ b/cmd/internal/cmdconfig/cmdconfig.go
@@ -50,6 +50,7 @@ func ReportingClient(ctx context.Context, cfg *config.Config) *errorreporting.Cl
if err != nil {
log.Fatal(ctx, err)
}
+ derrors.SetReportingClient(reporter)
return reporter
}