mirror of
https://github.com/golang/go
synced 2024-11-22 03:14:41 -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:
parent
0a40cd2661
commit
fe51d09bbe
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user