mirror of
https://github.com/golang/go
synced 2024-09-23 11:20:17 -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:
parent
0b57881571
commit
6dd79d02f8
@ -264,7 +264,7 @@ func (e errorString) Error() string {
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
// RERR_ is for runtime error, and may be regexps/substrings, to simplify use of tests with tools
|
// 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_PANIC = "runtime error: range function continued iteration after loop body panic"
|
||||||
RERR_EXHAUSTED = "runtime error: range function continued iteration after whole loop exit"
|
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"
|
RERR_MISSING = "runtime error: range function recovered a loop body panic and did not resume panicking"
|
||||||
|
@ -297,7 +297,7 @@ func deferproc(fn func()) {
|
|||||||
// been set and must not be clobbered.
|
// 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 rangePanicError = error(errorString("range function continued iteration after loop body panic"))
|
||||||
var rangeExhaustedError = error(errorString("range function continued iteration after whole loop exit"))
|
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"))
|
var rangeMissingPanicError = error(errorString("range function recovered a loop body panic and did not resume panicking"))
|
||||||
|
Loading…
Reference in New Issue
Block a user