• Rob Pike's avatar
    http: use runtime/debug.Stack() to dump stack trace on panic. · d6653fed
    Rob Pike authored
    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
    d6653fed
Name
Last commit
Last update
..
cgi Loading commit data...
fcgi Loading commit data...
httptest Loading commit data...
pprof Loading commit data...
spdy Loading commit data...
testdata Loading commit data...
Makefile Loading commit data...
chunked.go Loading commit data...
client.go Loading commit data...
client_test.go Loading commit data...
cookie.go Loading commit data...
cookie_test.go Loading commit data...
dump.go Loading commit data...
export_test.go Loading commit data...
fs.go Loading commit data...
fs_test.go Loading commit data...
header.go Loading commit data...
header_test.go Loading commit data...
lex.go Loading commit data...
lex_test.go Loading commit data...
persist.go Loading commit data...
proxy_test.go Loading commit data...
range_test.go Loading commit data...
readrequest_test.go Loading commit data...
request.go Loading commit data...
request_test.go Loading commit data...
requestwrite_test.go Loading commit data...
response.go Loading commit data...
response_test.go Loading commit data...
responsewrite_test.go Loading commit data...
reverseproxy.go Loading commit data...
reverseproxy_test.go Loading commit data...
serve_test.go Loading commit data...
server.go Loading commit data...
status.go Loading commit data...
transfer.go Loading commit data...
transport.go Loading commit data...
transport_test.go Loading commit data...
triv.go Loading commit data...
url.go Loading commit data...
url_test.go Loading commit data...