1.1 --- a/lib/__builtins__/exception/base.py Thu Jan 12 23:29:39 2017 +0100
1.2 +++ b/lib/__builtins__/exception/base.py Thu Jan 12 23:50:26 2017 +0100
1.3 @@ -1,7 +1,7 @@
1.4 #!/usr/bin/env python
1.5
1.6 """
1.7 -Base exception objects.
1.8 +Base exception objects. See __builtins__.core for the core exceptions.
1.9
1.10 Copyright (C) 2015, 2016 Paul Boddie <paul@boddie.org.uk>
1.11
1.12 @@ -19,21 +19,33 @@
1.13 this program. If not, see <http://www.gnu.org/licenses/>.
1.14 """
1.15
1.16 -class IndexError(Exception):
1.17 +class LookupError(Exception):
1.18 +
1.19 + "A general lookup error."
1.20 +
1.21 + pass
1.22 +
1.23 +class IndexError(LookupError):
1.24
1.25 "An error condition involving an index."
1.26
1.27 def __init__(self, index):
1.28 self.index = index
1.29
1.30 -class KeyError(Exception):
1.31 +class KeyError(LookupError):
1.32
1.33 "An error concerned with a dictionary key."
1.34
1.35 def __init__(self, key):
1.36 self.key = key
1.37
1.38 -class NotImplementedError(Exception):
1.39 +class RuntimeError(Exception):
1.40 +
1.41 + "A general runtime error."
1.42 +
1.43 + pass
1.44 +
1.45 +class NotImplementedError(RuntimeError):
1.46
1.47 "An error indicating an unimplemented function or method."
1.48