]> Cypherpunks repositories - gostls13.git/commit
exec: introduce ExitError
authorRuss Cox <rsc@golang.org>
Wed, 2 Nov 2011 01:49:44 +0000 (21:49 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 2 Nov 2011 01:49:44 +0000 (21:49 -0400)
commit451a1fa46d0449dc6982b38ba51cf94ebc750eca
treefb5307ac50ea9c4fe26fe7c7b306fb72aae699e7
parentc93b6a1756be708ba2d6c8c91c4dabdbbd653cbe
exec: introduce ExitError

The existing code uses *os.Waitmsg as an os.Error,
but *os.Waitmsg is really just a stringer.

Introduce an explicit error type for the real error.

Not to be submitted until just before error goes in;
the gofix for error updates type assertions
        err.(*os.Waitmsg)
to
        err.(*exec.ExitError)

The seemingly redundant String method will become
an Error method when error goes in, and will no longer
be redundant.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5331044
src/pkg/exec/exec.go
src/pkg/exec/exec_test.go