1
0
mirror of https://github.com/golang/go synced 2024-09-23 09:13:25 -06:00

runtime,cmd/compile: fix wording of rangefunc panic messages

Change-Id: I883e7b6554646f32ad44e4ea6583440c33f02b84
Reviewed-on: https://go-review.googlesource.com/c/go/+/587595
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
David Chase 2024-05-22 15:39:03 -04:00
parent 0b57881571
commit 6dd79d02f8
2 changed files with 2 additions and 2 deletions

View File

@ -264,7 +264,7 @@ func (e errorString) Error() string {
const (
// RERR_ is for runtime error, and may be regexps/substrings, to simplify use of tests with tools
RERR_DONE = "runtime error: range function continued iteration after loop body exit"
RERR_DONE = "runtime error: range function continued iteration after function for loop body returned false"
RERR_PANIC = "runtime error: range function continued iteration after loop body panic"
RERR_EXHAUSTED = "runtime error: range function continued iteration after whole loop exit"
RERR_MISSING = "runtime error: range function recovered a loop body panic and did not resume panicking"

View File

@ -297,7 +297,7 @@ func deferproc(fn func()) {
// been set and must not be clobbered.
}
var rangeDoneError = error(errorString("range function continued iteration after loop body exit"))
var rangeDoneError = error(errorString("range function continued iteration after function for loop body returned false"))
var rangePanicError = error(errorString("range function continued iteration after loop body panic"))
var rangeExhaustedError = error(errorString("range function continued iteration after whole loop exit"))
var rangeMissingPanicError = error(errorString("range function recovered a loop body panic and did not resume panicking"))