mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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
This commit is contained in:
parent
70e232e668
commit
a0bcaf4c00
47 changed files with 967 additions and 558 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue