all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Richard Copley <rcopley@gmail.com>
Cc: 25735@debbugs.gnu.org
Subject: bug#25735: 26.0.50; url-retrieve errors are peculiar
Date: Wed, 15 May 2019 09:19:10 +0200	[thread overview]
Message-ID: <87a7fouqvl.fsf@mouse.gnus.org> (raw)
In-Reply-To: <CAPM58ogLX4HRp0GLTxpqo+3La_PeVS7CvQif+nyMMPmP94vJbw@mail.gmail.com>

Richard Copley <rcopley@gmail.com> writes:

> No, it's the best I could come up with given the "hint":
>   "The error can be signaled with (signal ERROR-SYMBOL DATA)"
> in the url-retrieve docstring.

Oh, I misread what you wrote.

----
(:redirect REDIRECTED-TO) - the request was redirected to this URL
(:error (ERROR-SYMBOL . DATA)) - an error occurred.  The error can be
signaled with (signal ERROR-SYMBOL DATA).
----

So, yeah, that's wrong.  It should be more like

(signal ERROR-SYMBOL (format "%S" data))

I guess?  But, as you say, that's not very useful, either.  Describing
DATA would be nicer.

Here's the actual uses in url.el:

url-http.el 734:		     (nconc (list :error (list 'error 'http-redirect-limit
url-http.el 865:	       (nconc (list :error (list 'error 'http url-http-response-status))
url-http.el 920:	       (nconc (list :error (list 'error 'http url-http-response-status))
url-http.el 1446:	      (nconc (list :error (list 'error 'connection-failed why
url-queue.el 127:  (when (and (eq (car status) :error)
url-queue.el 190:	   (cons (list :error (list 'error 'url-queue-timeout

As we can see, the only ERROR-SYMBOL in use is `error', which makes this
even less useful, and the DATA depends on what the real error type is...

I guess we could just describe these in the doc string instead stop
talking about `signal'?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      parent reply	other threads:[~2019-05-15  7:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 21:21 bug#25735: 26.0.50; url-retrieve errors are peculiar Richard Copley
2019-05-15  6:04 ` Lars Ingebrigtsen
2019-05-15  7:01   ` Richard Copley
2019-05-15  7:16     ` Lars Ingebrigtsen
2019-05-15  7:46       ` Lars Ingebrigtsen
2019-05-15 20:59         ` Richard Copley
2019-05-16  3:59           ` Lars Ingebrigtsen
2019-05-16  8:11             ` Richard Copley
2019-05-15  7:17     ` Lars Ingebrigtsen
2019-05-15  7:19     ` Lars Ingebrigtsen [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7fouqvl.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=25735@debbugs.gnu.org \
    --cc=rcopley@gmail.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.