http: use runtime/debug.Stack() to dump stack trace on panic.
Test output now looks like this: 2011/06/15 21:10:41 http: panic serving 127.0.0.1:59729: intentional death for testing $GOROOT/src/pkg/http/server.go:495 (0x3f9f8) _func_004: buf.Write(debug.Stack()) $GOROOT/src/pkg/runtime/proc.c:1041 (0x12367) panic: reflect·call(d->fn, d->args, d->siz); $GOROOT/src/pkg/http/serve_test.go:775 (0x5831b) _func_029: panic("intentional death for testing") $GOROOT/src/pkg/http/server.go:575 (0x26366) HandlerFunc.ServeHTTP: f(w, r) $GOROOT/src/pkg/http/server.go:541 (0x261a9) *conn.serve: c.handler.ServeHTTP(w, w.req) $GOROOT/src/pkg/runtime/proc.c:178 (0x10a83) goexit: runtime·goexit(void) with $GOROOT expanded, of course. R=bradfitz, rsc CC=golang-dev https://golang.org/cl/4607051
Showing
Please
register
or
sign in
to comment