GNU bug report logs -
#5046
Too silent error reporting in imap.el:imap-open-1
Previous Next
Reported by: nisse <at> lysator.liu.se (Niels Möller)
Date: Thu, 26 Nov 2009 11:40:04 UTC
Severity: normal
Tags: fixed
Fixed in version 24.1
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5046 in the body.
You can then email your comments to 5046 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#5046
; Package
emacs
.
(Thu, 26 Nov 2009 11:40:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
nisse <at> lysator.liu.se (Niels Möller)
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Thu, 26 Nov 2009 11:40:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
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 <some host>... 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
Added tag(s) fixed.
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 18 Sep 2011 09:37:01 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 24.1, send any further explanations to
5046 <at> debbugs.gnu.org and nisse <at> lysator.liu.se (Niels Möller)
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sun, 18 Sep 2011 09:37:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#5046
; Package
emacs
.
(Sun, 18 Sep 2011 09:48:02 GMT)
Full text and
rfc822 format available.
Message #12 received at 5046 <at> debbugs.gnu.org (full text, mbox):
nisse <at> lysator.liu.se (Niels Möller) 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.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 16 Oct 2011 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.