diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2016-12-03 14:45:56 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2016-12-03 14:45:56 +0200 |
commit | eb9642ffeeab679b952e785be88916a450d317f7 (patch) | |
tree | 1d4f51deb400141c029fbc3915ac0944832b3df8 /astroid/exceptions.py | |
parent | ac3e82e9bd8678086325a71a927a06bbc43d415e (diff) | |
download | astroid-git-eb9642ffeeab679b952e785be88916a450d317f7.tar.gz |
Let the type error propagate as an AstroidTypeError.
Diffstat (limited to 'astroid/exceptions.py')
-rw-r--r-- | astroid/exceptions.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/astroid/exceptions.py b/astroid/exceptions.py index ea2b9b07..8b3f2522 100644 --- a/astroid/exceptions.py +++ b/astroid/exceptions.py @@ -196,6 +196,14 @@ class _NonDeducibleTypeHierarchy(Exception): """Raised when is_subtype / is_supertype can't deduce the relation between two types.""" +class AstroidIndexError(AstroidError): + """Raised when an Indexable / Mapping does not have an index / key.""" + + +class AstroidTypeError(AstroidError): + """Raised when a TypeError would be expected in Python code.""" + + # Backwards-compatibility aliases OperationError = util.BadOperationMessage UnaryOperationError = util.BadUnaryOperationMessage |