summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1995-04-14 02:10:52 +0000
committerKarl Heuer <kwzh@gnu.org>1995-04-14 02:10:52 +0000
commit027fd809862b178fa33f18406a5bc44e03f5b834 (patch)
treed2ff6bf141c2d168d21719e6abf9438e3f9e13b4
parent19c1bbc5313811e213cff812b2f182e7686d0485 (diff)
downloademacs-027fd809862b178fa33f18406a5bc44e03f5b834.tar.gz
(main): Improve error handling.
-rw-r--r--lib-src/emacsclient.c10
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