Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
marvel
GitHub Repository: marvel/qnf
Path: blob/master/elisp/emacs-for-python/rope-dist/rope/base/exceptions.py
1415 views
1
class RopeError(Exception):
2
"""Base exception for rope"""
3
4
5
class ResourceNotFoundError(RopeError):
6
"""Resource not found exception"""
7
8
9
class RefactoringError(RopeError):
10
"""Errors for performing a refactoring"""
11
12
13
class InterruptedTaskError(RopeError):
14
"""The task has been interrupted"""
15
16
17
class HistoryError(RopeError):
18
"""Errors for history undo/redo operations"""
19
20
21
class ModuleNotFoundError(RopeError):
22
"""Module not found exception"""
23
24
25
class AttributeNotFoundError(RopeError):
26
"""Attribute not found exception"""
27
28
29
class NameNotFoundError(RopeError):
30
"""Name not found exception"""
31
32
33
class BadIdentifierError(RopeError):
34
"""The name cannot be resolved"""
35
36
37
class ModuleSyntaxError(RopeError):
38
"""Module has syntax errors
39
40
The `filename` and `lineno` fields indicate where the error has
41
occurred.
42
43
"""
44
45
def __init__(self, filename, lineno, message):
46
self.filename = filename
47
self.lineno = lineno
48
self.message_ = message
49
super(ModuleSyntaxError, self).__init__(
50
'Syntax error in file <%s> line <%s>: %s' %
51
(filename, lineno, message))
52
53
54
class ModuleDecodeError(RopeError):
55
"""Cannot decode module"""
56
57
def __init__(self, filename, message):
58
self.filename = filename
59
self.message_ = message
60
super(ModuleDecodeError, self).__init__(
61
'Cannot decode file <%s>: %s' % (filename, message))
62
63