summaryrefslogtreecommitdiff
path: root/src/pkg/gob/error.go
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-04-28 10:35:15 +0200
committerOndřej Surý <ondrej@sury.org>2011-04-28 10:35:15 +0200
commitc1ba1a0fec4aed430709030f98a3bdb90bfeea16 (patch)
tree3df18657e50a0313ed6defcda30e4474cb28a467 /src/pkg/gob/error.go
parent7b15ed9ef455b6b66c6b376898a88aef5d6a9970 (diff)
downloadgolang-c1ba1a0fec4aed430709030f98a3bdb90bfeea16.tar.gz
Imported Upstream version 2011.04.27upstream/2011.04.27
Diffstat (limited to 'src/pkg/gob/error.go')
-rw-r--r--src/pkg/gob/error.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/gob/error.go b/src/pkg/gob/error.go
index b053761fb..bfd38fc16 100644
--- a/src/pkg/gob/error.go
+++ b/src/pkg/gob/error.go
@@ -22,8 +22,9 @@ type gobError struct {
}
// errorf is like error but takes Printf-style arguments to construct an os.Error.
+// It always prefixes the message with "gob: ".
func errorf(format string, args ...interface{}) {
- error(fmt.Errorf(format, args...))
+ error(fmt.Errorf("gob: "+format, args...))
}
// error wraps the argument error and uses it as the argument to panic.