]> Cypherpunks repositories - gostls13.git/commit
net, os, syscall: Plan 9: adjust error handling
authorAkshat Kumar <seed@mail.nanosouffle.net>
Thu, 28 Feb 2013 05:43:21 +0000 (06:43 +0100)
committerRon Minnich <rminnich@gmail.com>
Thu, 28 Feb 2013 05:43:21 +0000 (06:43 +0100)
commitf0a8b610e7a1839e3cec63b915f24874b294f7b1
treeaa7ffd08532550e628759630c8fb1c29550c3963
parent1f62a784f49d2c0d62b4c0dfcab5fcfdeeb493a4
net, os, syscall: Plan 9: adjust error handling

syscall: Use NewError for all system errors and introduce
        some new errors for compatibility with other packages
        and proper error handling in net. Also introduce
        Temporary and Timeout methods on ErrorString.

net: Make errors from dial, accept, listen functions follow the
        OpError standard and discern whether the underlying
        error came from syscall. Since Plan 9 uses a correspondence
        between file and network operations, all system error
        reporting happens through the underlying file operation.
        In Go code, we go through package os for file operations,
        so there is another level of indirection in error types.
        This change allows us to compare the errors with those in
        package syscall, when appropriate.

os: Just use the error string already present in package os,
        instead of calling out to package syscall.

R=rsc, ality, rminnich, bradfitz
CC=golang-dev
https://golang.org/cl/7398054
src/pkg/net/ipsock_plan9.go
src/pkg/net/tcpsock_plan9.go
src/pkg/os/exec/lp_plan9.go
src/pkg/syscall/syscall_plan9.go
src/pkg/syscall/zerrors_plan9_386.go
src/pkg/syscall/zerrors_plan9_amd64.go