delete/rewrite calls to panicln
R=rsc
CC=golang-dev
http://codereview.appspot.com/745041
diff --git a/compiler/main.go b/compiler/main.go
index 88bb4c5..f2cb3b2 100644
--- a/compiler/main.go
+++ b/compiler/main.go
@@ -458,7 +458,6 @@
func (g *Generator) objectNamed(typeName string) Object {
f, ok := g.typeNameToObject[typeName]
if !ok {
-panicln()
g.fail("can't find object with type", typeName)
}
return f
diff --git a/proto/properties.go b/proto/properties.go
index 65fd2fe..960329a 100644
--- a/proto/properties.go
+++ b/proto/properties.go
@@ -508,7 +508,7 @@
// maps into the global table to aid parsing ASCII protocol buffers.
func RegisterEnum(typeName string, nameMap map[int32]string, valueMap map[string]int32) {
if _, ok := enumNameMaps[typeName]; ok {
- panicln("proto: duplicate enum registered: ", typeName)
+ panic("proto: duplicate enum registered: " + typeName)
}
enumNameMaps[typeName] = nameMap
enumValueMaps[typeName] = valueMap