emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0bdd2eb9af1 1/2: Add context to errors thrown by server-start dur


From: Eli Zaretskii
Subject: master 0bdd2eb9af1 1/2: Add context to errors thrown by server-start during startup
Date: Sat, 24 Feb 2024 04:23:33 -0500 (EST)

branch: master
commit 0bdd2eb9af171fa9d825bc6d09e0ad5d114684c4
Author: Spencer Baugh <sbaugh@janestreet.com>
Commit: Eli Zaretskii <eliz@gnu.org>

    Add context to errors thrown by server-start during startup
    
    When server-start errors during startup, the error is printed to
    the terminal without context.  To help the user understand
    better what went wrong, that printed error now mentions that the
    error came from starting up the daemon.
    
    * lisp/startup.el (command-line): Catch and annotate errors
    thrown by server-start.  (bug#68799)
---
 lisp/startup.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index 1c21b5de857..33e1124b998 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1639,7 +1639,9 @@ Consider using a subdirectory instead, e.g.: %s"
   (let ((dn (daemonp)))
     (when dn
       (when (stringp dn) (setq server-name dn))
-      (server-start)
+      (condition-case err
+          (server-start)
+        (error (error "Unable to start daemon: %s; exiting" 
(error-message-string err))))
       (if server-process
          (daemon-initialized)
        (if (stringp dn)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]