mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Revert "cmd/compile: omit file:pos for non-existent, permission errors"
This reverts commit 4f7053c87f.
Reason for revert: Newly added test is failing on several builders.
Change-Id: I22dcbfebf2f57735b2f479886bbeb623f95b132f
Reviewed-on: https://go-review.googlesource.com/c/go/+/231043
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
4f7053c87f
commit
eda6fe3572
2 changed files with 1 additions and 76 deletions
|
|
@ -60,15 +60,9 @@ func adderrorname(n *Node) {
|
|||
}
|
||||
|
||||
func adderr(pos src.XPos, format string, args ...interface{}) {
|
||||
msg := fmt.Sprintf(format, args...)
|
||||
// Only add the position if we have a file.
|
||||
// See issue golang.org/issue/11361.
|
||||
if !strings.HasSuffix(msg, ": no such file or directory") && !strings.HasSuffix(msg, ": permission denied") {
|
||||
msg = fmt.Sprintf("%v: %s", linestr(pos), msg)
|
||||
}
|
||||
errors = append(errors, Error{
|
||||
pos: pos,
|
||||
msg: msg + "\n",
|
||||
msg: fmt.Sprintf("%v: %s\n", linestr(pos), fmt.Sprintf(format, args...)),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue