[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25735: 26.0.50; url-retrieve errors are peculiar
From: |
Lars Ingebrigtsen |
Subject: |
bug#25735: 26.0.50; url-retrieve errors are peculiar |
Date: |
Wed, 15 May 2019 09:17:09 +0200 |
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
bug#25735: 26.0.50; url-retrieve errors are peculiar,
Lars Ingebrigtsen <=
bug#25735: 26.0.50; url-retrieve errors are peculiar, Lars Ingebrigtsen, 2019/05/15