Browse Source

connect: log out supplied host when panicing

Chris Bannister 8 years ago
parent
commit
14538c4a7c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      conn.go

+ 2 - 2
conn.go

@@ -157,9 +157,9 @@ func Connect(host *HostInfo, cfg *ConnConfig, errorHandler ConnErrorHandler, ses
 	if host == nil {
 		panic("host is nil")
 	} else if len(host.ConnectAddress()) == 0 {
-		panic("host missing connect ip address")
+		panic(fmt.Sprintf("host missing connect ip address: %#+v", host))
 	} else if host.Port() == 0 {
-		panic("host missing port")
+		panic(fmt.Sprintf("host missing port: %#+v", host))
 	}
 
 	var (