Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(294)

Issue 7398054: code review 7398054: net, os, syscall: Plan 9: adjust error handling (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by akumar
Modified:
12 years, 3 months ago
Reviewers:
CC:
rsc, ality, rminnich, bradfitz, golang-dev
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r 234c58b9499b https://code.google.com/p/go #

Patch Set 3 : diff -r 234c58b9499b https://code.google.com/p/go #

Patch Set 4 : diff -r 234c58b9499b https://code.google.com/p/go #

Patch Set 5 : diff -r 234c58b9499b https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -48 lines) Patch
M src/pkg/net/ipsock_plan9.go View 1 2 3 4 3 chunks +30 lines, -20 lines 0 comments Download
M src/pkg/net/tcpsock_plan9.go View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/os/exec/lp_plan9.go View 1 2 chunks +1 line, -2 lines 0 comments Download
M src/pkg/syscall/syscall_plan9.go View 1 2 chunks +8 lines, -3 lines 0 comments Download
M src/pkg/syscall/zerrors_plan9_386.go View 1 2 3 2 chunks +19 lines, -10 lines 0 comments Download
M src/pkg/syscall/zerrors_plan9_amd64.go View 1 2 3 2 chunks +19 lines, -10 lines 0 comments Download

Messages

Total messages: 9
akumar
Hello rsc@golang.org, ality@pbrane.org, rminnich@gmail.com, bradfitz@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to ...
12 years, 3 months ago (2013-02-27 06:37:31 UTC) #1
bradfitz
LGTM On Tue, Feb 26, 2013 at 10:37 PM, <seed@mail.nanosouffle.net> wrote: > Reviewers: rsc, ality, ...
12 years, 3 months ago (2013-02-27 06:55:49 UTC) #2
ality
The net and os changes look good but the syscall changes are just too much ...
12 years, 3 months ago (2013-02-27 09:49:43 UTC) #3
akumar
The error strings above the comments are ones that are reported by the system. It ...
12 years, 3 months ago (2013-02-27 14:41:45 UTC) #4
bradfitz
On Wed, Feb 27, 2013 at 1:49 AM, Anthony Martin <ality@pbrane.org> wrote: > The net ...
12 years, 3 months ago (2013-02-27 15:50:46 UTC) #5
akumar
PTAL. Updated error handling in package net and removed the import of "errors" in package ...
12 years, 3 months ago (2013-02-27 17:08:08 UTC) #6
bradfitz
LGTM still Leaving for Anthony to submit, once he's happy. On Wed, Feb 27, 2013 ...
12 years, 3 months ago (2013-02-27 23:24:20 UTC) #7
rminnich
LGTM I think any remaining disagreements can be resolved with another bit of trimming, but ...
12 years, 3 months ago (2013-02-28 05:42:38 UTC) #8
rminnich
12 years, 3 months ago (2013-02-28 05:43:25 UTC) #9
*** Submitted as https://code.google.com/p/go/source/detail?r=7a706e0f5d51 ***

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://codereview.appspot.com/7398054

Committer: Ron Minnich <rminnich@gmail.com>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b