Convert to use class-based exceptions.

Correct exception information in one docstring.
This commit is contained in:
Fred Drake 2000-06-29 05:06:02 +00:00
parent 8aa3bd9098
commit ffdc48f45c

View file

@ -85,7 +85,8 @@ from bisect import bisect
# Exported constants # Exported constants
Error = 'mhlib.Error' class Error(Exception):
pass
class MH: class MH:
@ -330,7 +331,7 @@ class Folder:
f.close() f.close()
def getcurrent(self): def getcurrent(self):
"""Return the current message. Raise KeyError when there is none.""" """Return the current message. Raise Error when there is none."""
seqs = self.getsequences() seqs = self.getsequences()
try: try:
return max(seqs['cur']) return max(seqs['cur'])