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__ = [ 
 7          'MailException', 
 8          'MailNotEnabledException',  
 9          'MailConfigurationException', 
10          'TransportException',  
11          'TransportExhaustedException', 
12          'ManagerException' 
13      ] 
14   
15   
16   
17 -class MailException(Exception):
18 """The base for all TurboMail exceptions.""" 19 pass
20 21
22 -class MailNotEnabledException(MailException):
23 """Attempted to use TurboMail before being enabled.""" 24
25 - def __str__(self):
26 return "An attempt was made to use a facility of the TurboMail " \ 27 "framework but outbound mail hasn't been enabled in the " \ 28 "config file [via mail.on]."
29 30
31 -class MailConfigurationException(MailException):
32 """There was an error in the configuration of TurboMail.""" 33 34 pass
35 36
37 -class TransportException(MailException):
38 """The base for all TurboMail Transport exceptions.""" 39 40 pass
41 42
43 -class TransportExhaustedException(MailException):
44 """Attempted to use TurboMail before being enabled.""" 45
46 - def __str__(self):
47 return "This Transport instance is no longer capable of delivering mail."
48 49
50 -class ManagerException(MailException):
51 """The base for all TurboMail Manager exceptions.""" 52 pass
53