gobgp/cmd: add message gRPC connection error

Adds a user-friendly error message on gRPC connection error.

Resolves: #1701

Signed-off-by: Paul Greenberg <[email protected]>
This commit is contained in:
Paul Greenberg
2018-05-29 05:18:01 -04:00
parent ed3f7b711c
commit d433ceb87a
+1 -1
View File
@@ -281,7 +281,7 @@ func newClient() *cli.Client {
target := net.JoinHostPort(globalOpts.Host, strconv.Itoa(globalOpts.Port))
client, err := cli.New(target, grpcOpts...)
if err != nil {
exitWithError(err)
exitWithError(fmt.Errorf("failed to connect to %s over gRPC: %s", target, err))
}
return client
}