summaryrefslogtreecommitdiff
path: root/src/pkg/gob
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/gob')
-rw-r--r--src/pkg/gob/encode.go2
-rw-r--r--src/pkg/gob/type.go10
-rw-r--r--src/pkg/gob/type_test.go2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/pkg/gob/encode.go b/src/pkg/gob/encode.go
index cfd4a73c8..195d6c647 100644
--- a/src/pkg/gob/encode.go
+++ b/src/pkg/gob/encode.go
@@ -399,7 +399,7 @@ func encOpFor(rt reflect.Type) (encOp, int, os.Error) {
func compileEnc(rt reflect.Type) (*encEngine, os.Error) {
srt, ok := rt.(*reflect.StructType)
if !ok {
- panicln("can't happen: non-struct")
+ panic("can't happen: non-struct")
}
engine := new(encEngine)
engine.instr = make([]encInstr, srt.NumField()+1) // +1 for terminator
diff --git a/src/pkg/gob/type.go b/src/pkg/gob/type.go
index ace80d6ad..f08f2a04d 100644
--- a/src/pkg/gob/type.go
+++ b/src/pkg/gob/type.go
@@ -114,7 +114,7 @@ func init() {
// Move the id space upwards to allow for growth in the predefined world
// without breaking existing files.
if nextId > firstUserId {
- panicln("nextId too large:", nextId)
+ panic(fmt.Sprintln("nextId too large:", nextId))
}
nextId = firstUserId
}
@@ -303,7 +303,7 @@ func getType(name string, rt reflect.Type) (gobType, os.Error) {
func checkId(want, got typeId) {
if want != got {
- panicln("bootstrap type wrong id:", got.Name(), got, "not", want)
+ panic("bootstrap type wrong id: " + got.Name() + " " + got.string() + " not " + want.string())
}
}
@@ -312,7 +312,7 @@ func bootstrapType(name string, e interface{}, expect typeId) typeId {
rt := reflect.Typeof(e)
_, present := types[rt]
if present {
- panicln("bootstrap type already present:", name)
+ panic("bootstrap type already present: " + name)
}
typ := &commonType{name: name}
types[rt] = typ
@@ -356,7 +356,7 @@ var typeInfoMap = make(map[reflect.Type]*typeInfo) // protected by typeLock
// typeLock must be held.
func getTypeInfo(rt reflect.Type) (*typeInfo, os.Error) {
if _, ok := rt.(*reflect.PtrType); ok {
- panicln("pointer type in getTypeInfo:", rt.String())
+ panic("pointer type in getTypeInfo: " + rt.String())
}
info, ok := typeInfoMap[rt]
if !ok {
@@ -388,7 +388,7 @@ func getTypeInfo(rt reflect.Type) (*typeInfo, os.Error) {
func mustGetTypeInfo(rt reflect.Type) *typeInfo {
t, err := getTypeInfo(rt)
if err != nil {
- panicln("getTypeInfo:", err.String())
+ panic("getTypeInfo: " + err.String())
}
return t
}
diff --git a/src/pkg/gob/type_test.go b/src/pkg/gob/type_test.go
index 2c3d0442e..3d4871f1d 100644
--- a/src/pkg/gob/type_test.go
+++ b/src/pkg/gob/type_test.go
@@ -28,7 +28,7 @@ func getTypeUnlocked(name string, rt reflect.Type) gobType {
defer typeLock.Unlock()
t, err := getType(name, rt)
if err != nil {
- panicln("getTypeUnlocked:", err.String())
+ panic("getTypeUnlocked: " + err.String())
}
return t
}