Gnus development mailing list
 help / color / mirror / Atom feed
* Agent and wrong passwords
@ 2004-01-06 11:09 Eric Knauel
  2004-01-23 19:09 ` Kevin Greiner
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Knauel @ 2004-01-06 11:09 UTC (permalink / raw)



The nntp server I'm using is password protected, so the first time I
enter a group on that server I need to provide username and password
in the minibuffer.  This works fine in plugged and unplugged mode.

However, if I do `M-x gnus-agent-fetch-session RET' and the password
is wrong the agent says "Error Wrong type argument: stringp,
nil. Continue? (y or n)".  Is this what the agent is intended to say?

-Eric
-- 
"Excuse me --- Di Du Du Duuuuh Di Dii --- Huh Weeeheeee" (Albert King)




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Agent and wrong passwords
  2004-01-06 11:09 Agent and wrong passwords Eric Knauel
@ 2004-01-23 19:09 ` Kevin Greiner
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Greiner @ 2004-01-23 19:09 UTC (permalink / raw)


Eric Knauel <knauel@informatik.uni-tuebingen.de> writes:

> The nntp server I'm using is password protected, so the first time I
> enter a group on that server I need to provide username and password
> in the minibuffer.  This works fine in plugged and unplugged mode.
>
> However, if I do `M-x gnus-agent-fetch-session RET' and the password
> is wrong the agent says "Error Wrong type argument: stringp,
> nil. Continue? (y or n)".  Is this what the agent is intended to say?

Eric,

I've been looking into this and I believe that I now understand that
is happening.  When the authentication fails, the backend attempts to
throw an error.  The intent was probably (this is speculative as I
haven't found this code) to call (error msg) to signal the error.
This is the right thing to do except that it requires that msg be
bound to a string.  If msg is nil, the error function itself throws a
"wrong type argument" exception.

I believe that this is what you experienced.  I'm inlining a code
fragment to demonstrate.

(let ((msg "Good Message. Change msg to nil to break"))

(condition-case err

(progn
;; the body where something interesting happens
(error msg))

(error ; This isn't the function error but rather the types of 
       ; errors handled by this signal handler.
(message "Error %s.  Continue? " (error-message-string err)))))

If you eval this fragment, you can see the expected prompt issued by
the agent.  On the other hand, if you change the Good Message string
to nil, you can get the exact same prompt as you originally reported.

If you would do one test, it would make it possible to fix this error.

Start gnus.
M-: (setq debug-on-signal t)
M-x gnus-agent-fetch-session with a bad password

This will throw you into the debugger showing where the origin of the
original (error nil) expression.  Please post this stacktrace.

Kevin




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-01-23 19:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-06 11:09 Agent and wrong passwords Eric Knauel
2004-01-23 19:09 ` Kevin Greiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).