GNU bug report logs - #25735
26.0.50; url-retrieve errors are peculiar

Previous Next

Package: emacs;

Reported by: Richard Copley <rcopley <at> gmail.com>

Date: Tue, 14 Feb 2017 21:23:01 UTC

Severity: minor

Tags: fixed

Found in version 26.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Richard Copley <rcopley <at> gmail.com>
Cc: 25735 <at> debbugs.gnu.org
Subject: bug#25735: 26.0.50; url-retrieve errors are peculiar
Date: Wed, 15 May 2019 09:19:10 +0200
Richard Copley <rcopley <at> 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




This bug report was last modified 6 years and 65 days ago.

Previous Next


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