diff options
author | Karl Heuer <kwzh@gnu.org> | 1995-04-14 02:10:52 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1995-04-14 02:10:52 +0000 |
commit | 18a2fa9174835f88945d0b5bba6cfefc02e15b37 (patch) | |
tree | 8e1557afa84b590d8180a5d2bc9ff6934cc922be /lib-src/emacsclient.c | |
parent | af7bd86c795eac767a0c7f90ab4dd6c3a557dddd (diff) | |
download | emacs-18a2fa9174835f88945d0b5bba6cfefc02e15b37.tar.gz |
(main): Improve error handling.
Diffstat (limited to 'lib-src/emacsclient.c')
-rw-r--r-- | lib-src/emacsclient.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 65b5770c47e..6594910aa80 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -99,14 +99,16 @@ main (argc, argv) { 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 @@ main (argc, argv) #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 |