1
0
mirror of https://github.com/golang/go synced 2024-11-21 21:24:45 -07:00

doc/articles/error_handling: no more os.Error

R=golang-dev, dsymonds
CC=golang-dev
https://golang.org/cl/7304053
This commit is contained in:
Shenghou Ma 2013-02-06 18:32:54 +08:00
parent 0a40cd2661
commit fe51d09bbe

View 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)