The proposal accepted the name ErrNestingDepth.
For #51684
Change-Id: I702365f19e5e1889dbcc3c971eecff68e0b08727
Reviewed-on: https://go-review.googlesource.com/c/go/+/401854
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
-pkg regexp/syntax, const ErrInvalidDepth = "expression nests too deeply" #51684
-pkg regexp/syntax, const ErrInvalidDepth ErrorCode #51684
+pkg regexp/syntax, const ErrNestingDepth = "expression nests too deeply" #51684
+pkg regexp/syntax, const ErrNestingDepth ErrorCode #51684
ErrMissingRepeatArgument ErrorCode = "missing argument to repetition operator"
ErrTrailingBackslash ErrorCode = "trailing backslash at end of expression"
ErrUnexpectedParen ErrorCode = "unexpected )"
- ErrInvalidDepth ErrorCode = "expression nests too deeply"
+ ErrNestingDepth ErrorCode = "expression nests too deeply"
)
func (e ErrorCode) String() string {
}
}
if p.calcHeight(re, true) > maxHeight {
- panic(ErrInvalidDepth)
+ panic(ErrNestingDepth)
}
}
panic(r)
case nil:
// ok
- case ErrInvalidDepth:
- err = &Error{Code: ErrInvalidDepth, Expr: s}
+ case ErrNestingDepth:
+ err = &Error{Code: ErrNestingDepth, Expr: s}
}
}()