From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#25735: 26.0.50; url-retrieve errors are peculiar Date: Wed, 15 May 2019 09:19:10 +0200 Message-ID: <87a7fouqvl.fsf@mouse.gnus.org> References: <87lfz8uuc0.fsf@mouse.gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="74222"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 25735@debbugs.gnu.org To: Richard Copley Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 15 09:20:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQoD0-000J9P-HG for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 May 2019 09:20:14 +0200 Original-Received: from localhost ([127.0.0.1]:60873 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQoCz-0004Mm-Ge for geb-bug-gnu-emacs@m.gmane.org; Wed, 15 May 2019 03:20:13 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hQoCr-0004LX-2u for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 03:20:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hQoCp-0005lj-Rm for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 03:20:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37312) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hQoCp-0005kz-LK for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 03:20:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hQoCp-0008I1-7p for bug-gnu-emacs@gnu.org; Wed, 15 May 2019 03:20:03 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 May 2019 07:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25735 X-GNU-PR-Package: emacs Original-Received: via spool by 25735-submit@debbugs.gnu.org id=B25735.155790476031807 (code B ref 25735); Wed, 15 May 2019 07:20:02 +0000 Original-Received: (at 25735) by debbugs.gnu.org; 15 May 2019 07:19:20 +0000 Original-Received: from localhost ([127.0.0.1]:50856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQoC7-0008Gw-S6 for submit@debbugs.gnu.org; Wed, 15 May 2019 03:19:20 -0400 Original-Received: from hermes.netfonds.no ([80.91.224.195]:42550) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hQoC6-0008Go-5g for 25735@debbugs.gnu.org; Wed, 15 May 2019 03:19:18 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by hermes.netfonds.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1hQoC3-0006Fz-Ej; Wed, 15 May 2019 09:19:17 +0200 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:159328 Archived-At: Richard Copley 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