>>> e = PageBotFileFormatError('This format is currently not available.') >>> print(e) ! PageBot file format error: This format is currently not available.
| 20 | pass |
| 21 | |
| 22 | class PageBotFileFormatError(Exception): |
| 23 | """ |
| 24 | |
| 25 | >>> e = PageBotFileFormatError('This format is currently not available.') |
| 26 | >>> print(e) |
| 27 | ! PageBot file format error: This format is currently not available. |
| 28 | """ |
| 29 | |
| 30 | def __init__(self, msg): |
| 31 | super().__init__() |
| 32 | self.msg = msg |
| 33 | |
| 34 | def __str__(self): |
| 35 | return '! PageBot file format error: %s' % self.msg |
| 36 | |
| 37 | if __name__ == "__main__": |
| 38 | import doctest |