Skip to content

Commit

Permalink
improve error message in libp2p reflection-based transport option
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Jun 12, 2018
1 parent a08d9e6 commit 555afdb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/reflection_magic.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func checkReturnType(fnType, tptType reflect.Type) error {
fallthrough
case 1:
if !fnType.Out(0).Implements(tptType) {
return fmt.Errorf("expected first return value from transport constructor to be a transport")
return fmt.Errorf("transport constructor returns %s which doesn't implement %s", fnType.Out(0), tptType)
}
default:
return fmt.Errorf("expected transport constructor to return a transport and, optionally, an error")
Expand Down

0 comments on commit 555afdb

Please sign in to comment.