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

Issue 5331044: code review 5331044: exec: introduce ExitError (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 4 months ago by rsc
Modified:
13 years, 4 months ago
Reviewers:
CC:
golang-dev, bradfitz
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r eb6fbf796acc https://go.googlecode.com/hg #

Patch Set 3 : diff -r eb6fbf796acc https://go.googlecode.com/hg #

Patch Set 4 : diff -r b950f41f4326 https://go.googlecode.com/hg #

Patch Set 5 : diff -r a14fbb7af4fc https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -7 lines) Patch
M src/pkg/exec/exec.go View 1 4 chunks +12 lines, -3 lines 0 comments Download
M src/pkg/exec/exec_test.go View 1 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 3
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg
13 years, 4 months ago (2011-10-28 01:42:47 UTC) #1
bradfitz
LGTM I seem to recall that it was like this at some point during code ...
13 years, 4 months ago (2011-10-28 01:47:48 UTC) #2
rsc
13 years, 4 months ago (2011-11-02 01:49:47 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=d0eeadc0f073 ***

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
http://codereview.appspot.com/5331044
Sign in to reply to this message.

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