Checking error handling
- Send error message to the user when error appends while checking emails. darcs-hash:20060131214619-86b55-178fcd27dfb6785afd422e562f22ef07f2aa9457.gz
This commit is contained in:
@@ -865,8 +865,17 @@ class MailComponent(Component):
|
|||||||
body = body)
|
body = body)
|
||||||
self.stream.send(mesg)
|
self.stream.send(mesg)
|
||||||
account.disconnect()
|
account.disconnect()
|
||||||
|
account.in_error = False
|
||||||
except Exception,e:
|
except Exception,e:
|
||||||
# TODO : Send error message to the user
|
if account.in_error == False:
|
||||||
|
account.in_error = True
|
||||||
|
msg = Message(from_jid = name + "@" + unicode(self.jid), \
|
||||||
|
to_jid = jid, \
|
||||||
|
stanza_type = "error", \
|
||||||
|
subject = account.default_lang_class.check_error_subject, \
|
||||||
|
body = account.default_lang_class.check_error_body \
|
||||||
|
% (e))
|
||||||
|
self.stream.send(msg)
|
||||||
self.__logger.debug("Error while checking mail : %s" \
|
self.__logger.debug("Error while checking mail : %s" \
|
||||||
% (e))
|
% (e))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user