From: Richard Copley <rcopley@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 25735@debbugs.gnu.org
Subject: bug#25735: 26.0.50; url-retrieve errors are peculiar
Date: Wed, 15 May 2019 21:59:54 +0100 [thread overview]
Message-ID: <CAPM58og+tjriZO2GgMLnGVP7NUayhP4xuAA8iDmQQkiFASw5eA@mail.gmail.com> (raw)
In-Reply-To: <87tvdwtb1k.fsf@mouse.gnus.org>
[-- Attachment #1: Type: text/plain, Size: 1191 bytes --]
On Wed, 15 May 2019 at 08:46, Lars Ingebrigtsen <larsi@gnus.org> wrote:
> (Sorry for sending the previous email several times; I had some problems
> with the MTA...)
>
> I've now changed the doc string to
>
> ---
>
> \(:redirect REDIRECTED-TO) - the request was redirected to this URL.
>
> \(:error (error type . DATA)) - an error occurred. TYPE is a
> symbol that says something about where the error occurred, and
> DATA is a list (possibly nil) that describes the error further.
If there's a way to use that data to format an error message,
it would be good to provide an example, or a "see info node X",
if it's a common idiom.
I think usually if you're looking at a docstring it's because you
want to know how to use the function (as well as what it is for
and what exactly it does, which I think are covered in this case).
This is what I ended up with, after I reported the bug.
Sadly I didn't make a note of where if anywhere I cribbed it from.
(url-retrieve URL
(lambda (status cbargs)
(cl-loop for (key value) on status by 'cddr
do (when (eq key :error) (error "%s: %s" (car
value) (cdr value))))
BODY))
[-- Attachment #2: Type: text/html, Size: 2057 bytes --]
next prev parent reply other threads:[~2019-05-15 20:59 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 [this message]
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
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=CAPM58og+tjriZO2GgMLnGVP7NUayhP4xuAA8iDmQQkiFASw5eA@mail.gmail.com \
--to=rcopley@gmail.com \
--cc=25735@debbugs.gnu.org \
--cc=larsi@gnus.org \
/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.