From: Robert Pluim <rpluim@gmail.com>
To: 53762@debbugs.gnu.org
Cc: emacsq <laszlomail@protonmail.com>
Subject: bug#53762: Improve error message when during url retrieving network connection is lost
Date: Fri, 04 Feb 2022 10:50:41 +0100 [thread overview]
Message-ID: <87r18j7yfi.fsf@gmail.com> (raw)
In-Reply-To: <0alb06p4adi7DfKd_YPyh8NxSUppew_01ob8lx_aj8JtmGdl8TnKXWlLBxm8hqn4JNeGVK8uq97s-Y_46aFsR6ah16xHQGr7Wvbjq8Cp3HY=@protonmail.com> (emacsq via's message of "Thu, 03 Feb 2022 19:30:31 +0000")
>>>>> 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@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))
{
next prev parent reply other threads:[~2022-02-04 9:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-03 19:30 bug#53762: Improve error message when during url retrieving network connection is lost emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-04 9:50 ` Robert Pluim [this message]
2022-02-05 6:57 ` Lars Ingebrigtsen
2022-02-07 13:56 ` Robert Pluim
2022-02-07 16:48 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-02-08 8:40 ` Robert Pluim
2022-02-08 21:50 ` emacsq via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-03-16 17:59 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r18j7yfi.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=53762@debbugs.gnu.org \
--cc=laszlomail@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).