4 # Copyright 2007 Neil Shi <zeegeek@gmail.com>
6 # Exception definitions
7 # This file defines all the exceptions used by pymailheaders
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2 of the License, or
12 # (at your option) any later version.
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
19 from sys
import stderr
21 class Error(Exception):
24 @note: Public member variables:
29 def __init__(self
, where
, what
):
32 print >> stderr
, ': '.join([self
.where
, self
.what
])
35 return ': '.join([self
.where
, self
.what
])
37 class TryAgain(Error
):
38 """Network temporarily unavailable, try again."""