emacs-diffs
[Top][All Lists]
Advanced

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

master fa8c93ad9a: Improve error message for 'not running' processes


From: Robert Pluim
Subject: master fa8c93ad9a: Improve error message for 'not running' processes
Date: Wed, 16 Mar 2022 13:59:34 -0400 (EDT)

branch: master
commit fa8c93ad9a6ccd210324951d999adab3766bdf63
Author: Robert Pluim <rpluim@gmail.com>
Commit: Robert Pluim <rpluim@gmail.com>

    Improve error message for 'not running' processes
    
    The current error message is simply 'not running', but
    'status_message' can give information about why the process is in that
    state, such as network errors, so return that as well.  (Bug#53762)
    
    * src/process.c (send_process, Fprocess_send_eof): Add the output of
    'status_message' to the error string.
---
 src/process.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/process.c b/src/process.c
index 94cc880097..993e1c5603 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6420,7 +6420,7 @@ send_process (Lisp_Object proc, const char *buf, 
ptrdiff_t len,
   if (p->raw_status_new)
     update_status (p);
   if (! EQ (p->status, Qrun))
-    error ("Process %s not running", SDATA (p->name));
+    error ("Process %s not running: %s", SDATA (p->name), SDATA 
(status_message (p)));
   if (p->outfd < 0)
     error ("Output file descriptor of %s is closed", SDATA (p->name));
 
@@ -7125,7 +7125,7 @@ process has been transmitted to the serial port.  */)
   if (XPROCESS (proc)->raw_status_new)
     update_status (XPROCESS (proc));
   if (! EQ (XPROCESS (proc)->status, Qrun))
-    error ("Process %s not running", SDATA (XPROCESS (proc)->name));
+    error ("Process %s not running: %s", SDATA (XPROCESS (proc)->name), SDATA 
(status_message (XPROCESS (proc))));
 
   if (coding && CODING_REQUIRE_FLUSHING (coding))
     {



reply via email to

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