diff options
author | Russ Cox <rsc@golang.org> | 2009-06-25 20:24:55 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-06-25 20:24:55 -0700 |
commit | b26cd1bfcd7107d8208595614ba45f54d5efacf6 (patch) | |
tree | 1596fd2f89c1d896cdf5772aebc910f4e0ff5bda /src/pkg/io/bytebuffer.go | |
parent | 37fd11a43607dc5f7ff5c38311b060ada2a0e7a5 (diff) | |
download | golang-b26cd1bfcd7107d8208595614ba45f54d5efacf6.tar.gz |
Change os.Error convention:
echo back context of call in error if likely to be useful.
For example, if os.Open("/etc/passwd", os.O_RDONLY)
fails with syscall.EPERM, it returns as the os.Error
&PathError{
Op: "open",
Path: "/etc/passwd"
Error: os.EPERM
}
which formats as
open /etc/passwd: permission denied
Not converted:
datafmt
go/...
google/...
regexp
tabwriter
template
R=r
DELTA=1153 (561 added, 156 deleted, 436 changed)
OCL=30738
CL=30781
Diffstat (limited to 'src/pkg/io/bytebuffer.go')
-rw-r--r-- | src/pkg/io/bytebuffer.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pkg/io/bytebuffer.go b/src/pkg/io/bytebuffer.go index 2c356192e..6971c0e03 100644 --- a/src/pkg/io/bytebuffer.go +++ b/src/pkg/io/bytebuffer.go @@ -113,7 +113,7 @@ func (b *ByteBuffer) ReadByte() (c byte, err os.Error) { if b.off >= len(b.buf) { return 0, os.EOF; } - c = b.buf[b.off]; + c = b.buf[b.off]; b.off++; return c, nil; } |