Skip to content

Instantly share code, notes, and snippets.

@jaekwon
Created January 14, 2018 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaekwon/b72b2e3bc489f3f17186423fa3e8acc4 to your computer and use it in GitHub Desktop.
Save jaekwon/b72b2e3bc489f3f17186423fa3e8acc4 to your computer and use it in GitHub Desktop.
diff --git a/codec.go b/codec.go
index f3f2eaf..35a6c3a 100644
--- a/codec.go
+++ b/codec.go
@@ -219,7 +219,7 @@ func (cdc *Codec) getTypeInfoFromPrefix_rlock(iinfo *TypeInfo, pb PrefixBytes) (
return
}
if len(infos) > 1 {
- err = fmt.Errorf("Conflicting concrete types registered for %X: e.g. %v and %v.", pb)
+ err = fmt.Errorf("Conflicting concrete types registered for %X: e.g. %v and %v.", pb, infos[0].Type, infos[1].Type)
return
}
info = infos[0]
@@ -411,7 +411,8 @@ func (cdc *Codec) checkConflictsInPrio_nolock(iinfo *TypeInfo) error {
}
}
if !inPrio {
- return fmt.Errorf("%v conflicts with %v other(s). Add it to the priority list for %v.", cinfo.Type, iinfo.Type)
+ return fmt.Errorf("%v conflicts with %v other(s). Add it to the priority list for %v.",
+ cinfo.Type, len(cinfos), iinfo.Type)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment