Skip to content

Commit

Permalink
connect: log out supplied host when panicing
Browse files Browse the repository at this point in the history
  • Loading branch information
Zariel committed Jun 25, 2017
1 parent 7113222 commit 14538c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 14538c4

Please sign in to comment.