From nisse@lysator.liu.se Thu Nov 26 03:34:17 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 26 Nov 2009 11:34:17 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.3 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAQBYF7c011270 for ; Thu, 26 Nov 2009 03:34:16 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDcc2-00071w-NB for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 06:34:14 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDcbw-0006v2-FG for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 06:34:13 -0500 Received: from [199.232.76.173] (port=44995 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDcbv-0006tI-CF for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 06:34:07 -0500 Received: from mail.lysator.liu.se ([130.236.254.3]:47326) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NDcbt-0001FI-DE for bug-gnu-emacs@gnu.org; Thu, 26 Nov 2009 06:34:05 -0500 Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id EBB4840019 for ; Thu, 26 Nov 2009 12:33:00 +0100 (CET) Received: by mail.lysator.liu.se (Postfix, from userid 1674) id DD7CF400AE; Thu, 26 Nov 2009 12:33:00 +0100 (CET) Received: from stalhein.lysator.liu.se (stalhein.lysator.liu.se [130.236.254.204]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTP id AC8F740019 for ; Thu, 26 Nov 2009 12:33:00 +0100 (CET) Received: from stalhein.lysator.liu.se (localhost [127.0.0.1]) by stalhein.lysator.liu.se (8.13.8+Sun/8.13.4) with ESMTP id nAQBY2r7025780 for ; Thu, 26 Nov 2009 12:34:02 +0100 (MET) Received: (from nisse@localhost) by stalhein.lysator.liu.se (8.13.8+Sun/8.13.8/Submit) id nAQBY2vT025779; Thu, 26 Nov 2009 12:34:02 +0100 (MET) X-Authentication-Warning: stalhein.lysator.liu.se: nisse set sender to nisse@lysator.liu.se using -f To: bug-gnu-emacs@gnu.org Subject: Too silent error reporting in imap.el:imap-open-1 From: nisse@lysator.liu.se (Niels =?iso-8859-1?Q?M=F6ller?=) Date: Thu, 26 Nov 2009 12:34:02 +0100 Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV using ClamSMTP X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) This is a problem that I experienced on emacs-22.3 on w*ndows, but the code in question seem to be identical in emacs-23. I tried to configure an nnimap server in Gnus, and connection failed, with a message imap: Connecting to the-mail-server.com...failed with no further details. The real error was hidden by the condition-case (setq imap-current-mailbox nil imap-current-message nil imap-state 'initial imap-process (condition-case () (funcall (nth 2 (assq imap-stream imap-stream-alist)) "imap" buffer imap-server imap-port) ((error quit) nil))) in imap.el:imap-open-1. After some debugging, involving adding some additional message calls in imap-open-1, I figured out the trivial source for the problem. A typo in my .gnus file, where I wrote nnimap-stream 'tls rather than nnimap-stream tls Now, (quote tls) is not present on the imap-stream alist, which results in an attempt to funcall nil. If I had received an error message like "(quote tls) is not a valid imap stream type", I would have solved the problem a lot quicker. I'd like to suggest that error reporting is improved as follows: 1. Messages of the form "Connecting to ... failed." should be used only when the actual problem is related to the network connection (dns errors, connection refused, possibly tls-related handshaking errors, etc). It's long time since I read the elisp documentation, so I'm not sure if there are some defined error symbols that make this case easy to distinguish from other errors. And in the case that the error is in fact network related, it would be helpful to have the message provide any details that are available, to aid investigation of the underlying networking problem. 2. When imap-stream is not found on the imap-stream-alist, this should either be reported in some human-friendly form, or it should raise an error which is not masked by condition case on the way up. This would typically indicate either a configuration error (like in my case), or a bug in whatever code using imap-open. If I had seen the void-function error for this particular funcall, that would also have pointed out the problem fairly accurately. 3. The data for the error should not be throuwn away. If nothing more sensibly can be done to it, even a crude change to imap-process (condition-case (e) (funcall (nth 2 (assq imap-stream imap-stream-alist)) "imap" buffer imap-server imap-port) ((quit) nil) ((error) (message "imap-open: unexpected error %s" e) nil))) would be an improvement. Regards, /Niels From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 18 05:36:23 2011 Received: (at control) by debbugs.gnu.org; 18 Sep 2011 09:36:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5DnS-0006oo-Jc for submit@debbugs.gnu.org; Sun, 18 Sep 2011 05:36:23 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5DnP-0006oY-Ni for control@debbugs.gnu.org; Sun, 18 Sep 2011 05:36:20 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R5DiX-0007Fk-Jl for control@debbugs.gnu.org; Sun, 18 Sep 2011 11:31:17 +0200 Date: Sun, 18 Sep 2011 11:27:57 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #5046 X-MailScanner-ID: 1R5DiX-0007Fk-Jl X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316943078.80798@d2X9+oZTKZvbr/Htouz/WQ X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) tags 5046 fixed close 5046 24.1 From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 18 05:47:19 2011 Received: (at 5046) by debbugs.gnu.org; 18 Sep 2011 09:47:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5Dy2-0007zD-G8 for submit@debbugs.gnu.org; Sun, 18 Sep 2011 05:47:19 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R5Dy0-0007yz-5V for 5046@debbugs.gnu.org; Sun, 18 Sep 2011 05:47:17 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=stories.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1R5Dt7-0007UF-F8; Sun, 18 Sep 2011 11:42:13 +0200 From: Lars Magne Ingebrigtsen To: nisse@lysator.liu.se (Niels =?iso-8859-1?Q?M=F6ller?=) Subject: Re: Too silent error reporting in imap.el:imap-open-1 In-Reply-To: ("Niels \=\?iso-8859-1\?Q\?M\=F6ller\=22's\?\= message of "Thu, 26 Nov 2009 12:34:02 +0100") Date: Sun, 18 Sep 2011 11:27:54 +0200 Message-ID: References: User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Eurythmics's _Touch Dance_: "Cool Blue" MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-MailScanner-ID: 1R5Dt7-0007UF-F8 X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1316943733.57752@HWFWYDSTefrpd85HRvpwlw X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 5046 Cc: 5046@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) nisse@lysator.liu.se (Niels M=F6ller) writes: > I tried to configure an nnimap server in Gnus, and connection failed, > with a message > > imap: Connecting to the-mail-server.com...failed This has been fixed in Emacs 24, where IMAP failures should give better error messages. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Sat Jun 21 03:22:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 16 Oct 2011 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator