diff options
Diffstat (limited to 'load.go')
| -rw-r--r-- | load.go | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -116,11 +116,17 @@ func LoadPB(pb proto.Message) error { } newver, _ := GetString(pb, "version") if ver != newver { + fmt.Println("") fmt.Printf("VERSION '%s' != '%s'\n", ver, newver) + fmt.Println("") fmt.Println("Your protobuf file is old and can not be loaded") + fmt.Println("your application must decide how to handle this (delete or fix)") + fmt.Println("always panic here. application is broken") fmt.Println("You must delete or convert the file", fullname) - // probably should ALWAYS PANIC HERE - panic("protobuf version mismatch") + fmt.Println("") + // probably should ALWAYS PANIC HERE // upon further study, always panic here is better than not + s := fmt.Sprintf("protobuf version wrong. delete or fix %s", fullname) + panic(s) } return nil } |
