changeset 11434:5f5dda37c82c

(main): Improve error handling.
author Karl Heuer <kwzh@gnu.org>
date Fri, 14 Apr 1995 02:10:52 +0000
parents 6f7bdb6c3739
children efaaecd960ae
files lib-src/emacsclient.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/emacsclient.c	Thu Apr 13 23:02:25 1995 +0000
+++ b/lib-src/emacsclient.c	Fri Apr 14 02:10:52 1995 +0000
@@ -99,14 +99,16 @@
       {
 	if (errno == ENOENT)
 	  fprintf (stderr,
-		   "Can't find socket; have you started the server?\n");
+		   "%s: can't find socket; have you started the server?\n",
+		   argv[0]);
 	else
-	  perror ("stat");
+	  fprintf (stderr, "%s: can't stat %s: %s\n",
+		   argv[0], server.sun_path, strerror (errno));
 	exit (1);
       }
     if (statbfr.st_uid != geteuid ())
       {
-	fprintf (stderr, "Invalid socket owner\n");
+	fprintf (stderr, "%s: Invalid socket owner\n", argv[0]);
 	exit (1);
       }
   }
@@ -302,7 +304,7 @@
 #ifdef HPUX /* HPUX has a bug.  */
   if (strlen (msgp->mtext) >= 512)
     {
-      fprintf (stderr, "emacsclient: args too long for msgsnd\n");
+      fprintf (stderr, "%s: args too long for msgsnd\n", progname);
       exit (1);
     }
 #endif