Statistics
| Revision:

gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / astroid / exceptions.py @ 745

History | View | Annotate | Download (2.29 KB)

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 MroError(ResolveError):
34
    """Error raised when there is a problem with method resolution of a class."""
35

    
36

    
37
class DuplicateBasesError(MroError):
38
    """Error raised when there are duplicate bases in the same class bases."""
39

    
40

    
41
class InconsistentMroError(MroError):
42
    """Error raised when a class's MRO is inconsistent."""
43

    
44

    
45
class SuperError(ResolveError):
46
    """Error raised when there is a problem with a super call."""
47

    
48

    
49
class SuperArgumentTypeError(SuperError):
50
    """Error raised when the super arguments are invalid."""
51

    
52

    
53
class NotFoundError(ResolveError):
54
    """raised when we are unable to resolve a name"""
55

    
56
class InferenceError(ResolveError):
57
    """raised when we are unable to infer a node"""
58

    
59
class UseInferenceDefault(Exception):
60
    """exception to be raised in custom inference function to indicate that it
61
    should go back to the default behaviour
62
    """
63

    
64
class UnresolvableName(InferenceError):
65
    """raised when we are unable to resolve a name"""
66

    
67
class NoDefault(AstroidError):
68
    """raised by function's `default_value` method when an argument has
69
    no default value
70
    """
71