diff options
| author | Robert Griesemer <gri@golang.org> | 2023-05-23 15:50:13 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-05-24 00:18:17 +0000 |
| commit | e0db8ab6e0d26fe1e05f6824cff670c61f38a3a4 (patch) | |
| tree | cb3ea2dee04e69eace69b44abf6f3264be01b7d9 /src/database/sql/sql_test.go | |
| parent | 0df681248862a34ff1233cdc4cf0b036e4761652 (diff) | |
| download | go-e0db8ab6e0d26fe1e05f6824cff670c61f38a3a4.tar.xz | |
cmd/compile: report an error URL with error messages
In the type checkers, add Config.ErrorURL (or Config._ErrorURL for
go/types) to configure whether and how an error message should report
a URL for errors that have an error code.
In the compiler, configure types2 to report an error URL of the form
" [go.dev/e/XXX]", where XXX stands for the error code, with the URL
appended to the first line of an error.
Rename the compiler flag -url to -errorurl. At the moment this flag
is disabled by default.
Example for a one-line error message:
<pos>: undefined: f [go.dev/e/UndeclaredName]
Example for a multi-line error message:
<pos>: not enough arguments in call to min [go.dev/e/WrongArgCount]
have ()
want (P, P)
Change-Id: I26651ce2c92ad32fddd641f003db37fe12fdb1cd
Reviewed-on: https://go-review.googlesource.com/c/go/+/497715
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Diffstat (limited to 'src/database/sql/sql_test.go')
0 files changed, 0 insertions, 0 deletions
