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

Unified Diff: src/pkg/big/int.go

Issue 4607052: code review 4607052: os.Error API: don't export os.ErrorString, use os.NewEr... (Closed)
Patch Set: diff -r 6e3e06fb2dc3 https://go.googlecode.com/hg/ Created 13 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/archive/tar/reader.go ('k') | src/pkg/big/nat.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/big/int.go
===================================================================
--- a/src/pkg/big/int.go
+++ b/src/pkg/big/int.go
@@ -430,7 +430,7 @@
case 's', 'v':
// let scan determine the base
default:
- return os.ErrorString("Int.Scan: invalid verb")
+ return os.NewError("Int.Scan: invalid verb")
}
_, _, err := z.scan(s, base)
return err
@@ -834,11 +834,11 @@
// GobDecode implements the gob.GobDecoder interface.
func (z *Int) GobDecode(buf []byte) os.Error {
if len(buf) == 0 {
- return os.ErrorString("Int.GobDecode: no data")
+ return os.NewError("Int.GobDecode: no data")
}
b := buf[0]
if b>>1 != intGobVersion {
- return os.ErrorString(fmt.Sprintf("Int.GobDecode: encoding version %d not supported", b>>1))
+ return os.NewError(fmt.Sprintf("Int.GobDecode: encoding version %d not supported", b>>1))
}
z.neg = b&1 != 0
z.abs = z.abs.setBytes(buf[1:])
« no previous file with comments | « src/pkg/archive/tar/reader.go ('k') | src/pkg/big/nat.go » ('j') | no next file with comments »

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