]> Cypherpunks repositories - gostls13.git/commitdiff
regexp: add a package prefix to error strings.
authorNigel Tao <nigeltao@golang.org>
Fri, 17 Jun 2011 00:50:38 +0000 (10:50 +1000)
committerNigel Tao <nigeltao@golang.org>
Fri, 17 Jun 2011 00:50:38 +0000 (10:50 +1000)
R=r, r
CC=golang-dev
https://golang.org/cl/4630041

src/pkg/regexp/regexp.go

index e3221ac9d68e70948641beee70fd8eccfaf34f5e..44da8b67107c3902c9287f5cf297049aa41bdfb6 100644 (file)
@@ -87,16 +87,16 @@ func (e Error) String() string {
 
 // Error codes returned by failures to parse an expression.
 var (
-       ErrInternal            = Error("internal error")
-       ErrUnmatchedLpar       = Error("unmatched '('")
-       ErrUnmatchedRpar       = Error("unmatched ')'")
-       ErrUnmatchedLbkt       = Error("unmatched '['")
-       ErrUnmatchedRbkt       = Error("unmatched ']'")
-       ErrBadRange            = Error("bad range in character class")
-       ErrExtraneousBackslash = Error("extraneous backslash")
-       ErrBadClosure          = Error("repeated closure (**, ++, etc.)")
-       ErrBareClosure         = Error("closure applies to nothing")
-       ErrBadBackslash        = Error("illegal backslash escape")
+       ErrInternal            = Error("regexp: internal error")
+       ErrUnmatchedLpar       = Error("regexp: unmatched '('")
+       ErrUnmatchedRpar       = Error("regexp: unmatched ')'")
+       ErrUnmatchedLbkt       = Error("regexp: unmatched '['")
+       ErrUnmatchedRbkt       = Error("regexp: unmatched ']'")
+       ErrBadRange            = Error("regexp: bad range in character class")
+       ErrExtraneousBackslash = Error("regexp: extraneous backslash")
+       ErrBadClosure          = Error("regexp: repeated closure (**, ++, etc.)")
+       ErrBareClosure         = Error("regexp: closure applies to nothing")
+       ErrBadBackslash        = Error("regexp: illegal backslash escape")
 )
 
 const (