diff options
author | Russ Cox <rsc@golang.org> | 2020-10-29 13:57:12 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2020-10-29 20:50:02 +0000 |
commit | 38d1ec8c9d09c680065404fe77168fe992e09e82 (patch) | |
tree | fe542fdd4640455e1b3f66d552f3e6127fc9eae2 /api | |
parent | aa4f48b751dbbfcb82e69d7622e7a9e9b8e48ee0 (diff) | |
download | go-38d1ec8c9d09c680065404fe77168fe992e09e82.tar.gz go-38d1ec8c9d09c680065404fe77168fe992e09e82.zip |
cmd/internal/obj: use panic instead of log.Fatalf for two messages
These messages can happen if there are
duplicate body-less function declarations.
Using panic gives the panic handler
a chance to handle the panic by printing the
queued error messages instead of an internal error.
And if there are no queued error messages,
using panic pinpoints the stack trace leading
to the incorrect use of NewFuncInfo/NewFileInfo.
Change-Id: I7e7ea9822ff9a1e7140f5e5b7cfd6437ff9318a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/266338
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'api')
0 files changed, 0 insertions, 0 deletions