|
Revision 117, 1.3 kB
(checked in by fs, 2 months ago)
|
|
renamed providers to transports which reflects the real purpose better
|
-
Property svn:keywords set to
Revision
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | """Exceptions used by TurboMail to report common errors.""" |
|---|
| 4 | |
|---|
| 5 | __version__ = "$Revision$" |
|---|
| 6 | __all__ = ['MailException', 'MailNotEnabledException', 'MailConfigurationException', |
|---|
| 7 | 'TransportException', 'TransportExhaustedException', 'ManagerException'] |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | class MailException(Exception): |
|---|
| 11 | """The base for all TurboMail exceptions.""" |
|---|
| 12 | |
|---|
| 13 | pass |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | class MailNotEnabledException(MailException): |
|---|
| 17 | """Attempted to use TurboMail before being enabled.""" |
|---|
| 18 | |
|---|
| 19 | def __str__(self): |
|---|
| 20 | return "An attempt was made to use a facility of the TurboMail " \ |
|---|
| 21 | "framework but outbound mail hasn't been enabled in the " \ |
|---|
| 22 | "config file [via mail.on]." |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | class MailConfigurationException(MailException): |
|---|
| 26 | """There was an error in the configuration of TurboMail.""" |
|---|
| 27 | |
|---|
| 28 | pass |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | class TransportException(MailException): |
|---|
| 32 | """The base for all TurboMail Transport exceptions.""" |
|---|
| 33 | |
|---|
| 34 | pass |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | class TransportExhaustedException(MailException): |
|---|
| 38 | """Attempted to use TurboMail before being enabled.""" |
|---|
| 39 | |
|---|
| 40 | def __str__(self): |
|---|
| 41 | return "This Transport instance is no longer capable of delivering mail." |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | class ManagerException(MailException): |
|---|
| 45 | """The base for all TurboMail Manager exceptions.""" |
|---|
| 46 | |
|---|
| 47 | pass |
|---|