On Sat, 4 Jan 2020 at 7:09 PM, Bob Newell < bobnew...@bobnewell.net > wrote:> > 
(defun news-check ()
(condition-case err
(message "The result is %s" (gnus-group-get-new-news))
(news-error
(message "I expect the server closed again %s",err)
)
)
)

I could be mistaken in this, but in your code above, where did you get
'news-error' as the name of the error condition raised? I can't find this
anywhere in the gnus source tree. Do you know for sure that
gnus-group-get-new-news (or anything it calls) raises that condition?


Thank you for your response. It is useful to me that you ask this. I could not
tell from the manual that "arith-error" in the example had a specific meaning,
so I arbitrarily changed it.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Handling-Errors.html

How do I tell what the error condition will be? The code in nntp.el is this (I
think this is where the server closed condition occurs) :
(defun nntp-report (&rest args)
"Report an error from the nntp backend. The first string in ARGS
can be a format string. For some commands, the failed command may be
retried once before actually displaying the error report."
(if nntp--report-1
(progn
;; Throw out to nntp-with-open-group-error so that the connection may
;; be restored and the command retried."
(when nntp-record-commands
(nntp-record-command "*** CONNECTION LOST ***"))
(throw 'nntp-with-open-group-error t))

(when nntp-record-commands
(nntp-record-command "*** CALLED nntp-report ***"))

(nnheader-report 'nntp args)

(apply 'error args)
))



[https://api.criptext.com/email/open/%3C1578166265275.914646%40criptext.com%3E]
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

Reply via email to