OLD | NEW |
(Empty) | |
| 1 # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. |
| 2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr |
| 3 # |
| 4 # This file is part of astroid. |
| 5 # |
| 6 # astroid is free software: you can redistribute it and/or modify it |
| 7 # under the terms of the GNU Lesser General Public License as published by the |
| 8 # Free Software Foundation, either version 2.1 of the License, or (at your |
| 9 # option) any later version. |
| 10 # |
| 11 # astroid is distributed in the hope that it will be useful, but |
| 12 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License |
| 14 # for more details. |
| 15 # |
| 16 # You should have received a copy of the GNU Lesser General Public License along |
| 17 # with astroid. If not, see <http://www.gnu.org/licenses/>. |
| 18 """this module contains exceptions used in the astroid library |
| 19 |
| 20 """ |
| 21 |
| 22 __doctype__ = "restructuredtext en" |
| 23 |
| 24 class AstroidError(Exception): |
| 25 """base exception class for all astroid related exceptions""" |
| 26 |
| 27 class AstroidBuildingException(AstroidError): |
| 28 """exception class when we are unable to build an astroid representation""" |
| 29 |
| 30 class ResolveError(AstroidError): |
| 31 """base class of astroid resolution/inference error""" |
| 32 |
| 33 class NotFoundError(ResolveError): |
| 34 """raised when we are unable to resolve a name""" |
| 35 |
| 36 class InferenceError(ResolveError): |
| 37 """raised when we are unable to infer a node""" |
| 38 |
| 39 class UseInferenceDefault(Exception): |
| 40 """exception to be raised in custom inference function to indicate that it |
| 41 should go back to the default behaviour |
| 42 """ |
| 43 |
| 44 class UnresolvableName(InferenceError): |
| 45 """raised when we are unable to resolve a name""" |
| 46 |
| 47 class NoDefault(AstroidError): |
| 48 """raised by function's `default_value` method when an argument has |
| 49 no default value |
| 50 """ |
| 51 |
OLD | NEW |