doc/effective_go.html | 13 ++++++++++--- diff --git a/doc/effective_go.html b/doc/effective_go.html index 0f9b70729e22cf2439aee18429374af196107e46..9a674c72bfea8380c7399a17fb24c659f4de3c7d 100644 --- a/doc/effective_go.html +++ b/doc/effective_go.html @@ -233,9 +233,9 @@
 // Error codes returned by failures to parse an expression.
 var (
-    ErrInternal      = os.NewError("internal error")
-    ErrUnmatchedLpar = os.NewError("unmatched '('")
-    ErrUnmatchedRpar = os.NewError("unmatched ')'")
+    ErrInternal      = os.NewError("regexp: internal error")
+    ErrUnmatchedLpar = os.NewError("regexp: unmatched '('")
+    ErrUnmatchedRpar = os.NewError("regexp: unmatched ')'")
     ...
 )
 
@@ -2671,6 +2671,13 @@ operation, and the operating system error it triggered, is useful even if printed far from the call that caused it; it is much more informative than the plain "no such file or directory". +

+ +

+When feasible, error strings should identify their origin, such as by having +a prefix naming the package that generated the error. For example, in package +image, the string representation for a decoding error due to an unknown format +is "image: unknown format".