GNU bug report logs - #53762
Improve error message when during url retrieving network connection is lost

Previous Next

Package: emacs;

Reported by: emacsq <laszlomail <at> protonmail.com>

Date: Thu, 3 Feb 2022 19:32:02 UTC

Severity: wishlist

Tags: fixed

Fixed in version 29.1

Done: Robert Pluim <rpluim <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 53762 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: 53762 <at> debbugs.gnu.org
Cc: emacsq <laszlomail <at> protonmail.com>
Subject: Re: bug#53762: Improve error message when during url retrieving
 network connection is lost
Date: Fri, 04 Feb 2022 10:50:41 +0100
>>>>> On Thu, 03 Feb 2022 19:30:31 +0000, emacsq via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> said:

    emacsq> Sometimes when fetching an URL with url-retireve emacs
    emacsq> returns the error "Process <URL> not running"

    emacsq> This is the case when emacs tries to do an operation
    emacsq> on the process and finds the process is not running anymore.

    emacsq> In case of fetching an url it is presumably because of
    emacsq> the network connection is unexpectedly lost, so for network
    emacsq> processes returning an error message like "Network connection
    emacsq> closed unexpectedly" or similar is more informative for the
    emacsq> user than saying "Process X not running".

Does something like this do the trick? Iʼve not been able to get a
reliable test case for it yet.

diff --git a/src/process.c b/src/process.c
index 7c7f608284..18d4579dba 100644
--- a/src/process.c
+++ b/src/process.c
@@ -6424,7 +6424,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 %s", SDATA (p->name), SDATA (status_message (p)));
   if (p->outfd < 0)
     error ("Output file descriptor of %s is closed", SDATA (p->name));
 
@@ -7129,7 +7129,7 @@ DEFUN ("process-send-eof", Fprocess_send_eof, Sprocess_send_eof, 0, 1, 0,
   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 %s", SDATA (XPROCESS (proc)->name), SDATA (status_message (XPROCESS (proc))));
 
   if (coding && CODING_REQUIRE_FLUSHING (coding))
     {




This bug report was last modified 3 years and 68 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.