Commit 555afdb8 authored by Steven Allen's avatar Steven Allen
Browse files

improve error message in libp2p reflection-based transport option

parent a08d9e63
......@@ -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")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment