From: Spencer Baugh Date: Wed, 14 Feb 2024 16:09:33 +0000 (-0500) Subject: Add context to errors thrown by server-start during startup X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8a4059ae94309b329cba5e8ac688cc91ce667d01;p=emacs.git 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) (cherry picked from commit 0bdd2eb9af171fa9d825bc6d09e0ad5d114684c4) --- 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)