]> sourceware.org Git - systemtap.git/commitdiff
remote.cxx: improve error messages
authorJonathan Lebon <jlebon@redhat.com>
Tue, 15 Oct 2013 17:49:55 +0000 (13:49 -0400)
committerJonathan Lebon <jlebon@redhat.com>
Wed, 16 Oct 2013 14:25:23 +0000 (10:25 -0400)
1. Add received reply from a bad handshake
2. In unix_stapsh: include URI socket path on bad connect()

remote.cxx

index 0b74c0e49db1885b60423fd632b38d98fd1f2249..5f2a413e98b141798d61084a4875c9ea8bf245bf 100644 (file)
@@ -419,7 +419,7 @@ class stapsh : public remote {
         vector<string> uname;
         tokenize(reply, uname, " \t\r\n");
         if (uname.size() != 4 || uname[0] != "stapsh")
-          throw runtime_error(_("failed to get uname from stapsh"));
+          throw runtime_error(_F("invalid hello from stapsh: %s", reply.c_str()));
 
         // We assume that later versions will know how to talk to us.
         // Looking backward, we use this for make_run_command().
@@ -519,7 +519,8 @@ class unix_stapsh : public stapsh {
           {
             const char *msg = strerror(errno);
             ::close(fd);
-            throw runtime_error(_F("error connecting to socket: %s", msg));
+            throw runtime_error(_F("error connecting to socket %s: %s",
+                                    server.sun_path, msg));
           }
 
         // Try to dup it, so class stapsh can have truly separate fds for its
This page took 0.02888 seconds and 5 git commands to generate.