Be more verbose when a peer or listener is badly formatted

This commit is contained in:
Neil Alexander 2019-09-18 15:01:19 +01:00
parent a62e029e21
commit 846df4789a
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
3 changed files with 15 additions and 6 deletions

View file

@ -86,7 +86,7 @@ func (l *link) reconfigure() {
func (l *link) call(uri string, sintf string) error {
u, err := url.Parse(uri)
if err != nil {
return err
return fmt.Errorf("peer %s is not correctly formatted (%s)", uri, err)
}
pathtokens := strings.Split(strings.Trim(u.Path, "/"), "/")
switch u.Scheme {
@ -103,7 +103,7 @@ func (l *link) call(uri string, sintf string) error {
func (l *link) listen(uri string) error {
u, err := url.Parse(uri)
if err != nil {
return err
return fmt.Errorf("listener %s is not correctly formatted (%s)", uri, err)
}
switch u.Scheme {
case "tcp":