]> Cypherpunks repositories - gostls13.git/commitdiff
doc/articles/error_handling: no more os.Error
authorShenghou Ma <minux.ma@gmail.com>
Wed, 6 Feb 2013 10:32:54 +0000 (18:32 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Wed, 6 Feb 2013 10:32:54 +0000 (18:32 +0800)
R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/7304053

doc/progs/error4.go

index bf234c98f8bb294e137e484df9f2b96182d71249..d40fc6eb237f665782b5e9f3e568373222b72737 100644 (file)
@@ -24,7 +24,7 @@ type appError struct {
 type appHandler func(http.ResponseWriter, *http.Request) *appError
 
 func (fn appHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
-       if e := fn(w, r); e != nil { // e is *appError, not os.Error.
+       if e := fn(w, r); e != nil { // e is *appError, not error.
                c := appengine.NewContext(r)
                c.Errorf("%v", e.Error)
                http.Error(w, e.Message, e.Code)