Package turbomail :: Module exceptions
[hide private]
[frames] | no frames]

Source Code for Module turbomail.exceptions

 1  # encoding: utf-8 
 2   
 3  """Exceptions used by TurboMail to report common errors.""" 
 4   
 5   
 6  __all__ = ['MailException', 'MailNotEnabledException', 'MailConfigurationException'] 
 7   
 8   
9 -class MailException(Exception):
10 """The base for all TurboMail exceptions.""" 11 12 pass
13 14
15 -class MailNotEnabledException(MailException):
16 """Attempted to use TurboMail before being enabled.""" 17
18 - def __str__(self):
19 return "An attempt was made to use a facility of the TurboMail " \ 20 "framework but outbound mail hasn't been enabled in the " \ 21 "config file [via mail.on]."
22 23
24 -class MailConfigurationException(MailException):
25 """There was an error in the configuration of TurboMail.""" 26 27 args = ()
28 - def __init__(self, message):
29 self.message= message
30
31 - def __str__(self):
32 return self.message
33