src/eric7/PluginManager/PluginExceptions.py

branch
eric7
changeset 10428
a071d4065202
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10427:3733e2b23cf7 10428:a071d4065202
26 def __repr__(self): 26 def __repr__(self):
27 """ 27 """
28 Special method returning a representation of the exception. 28 Special method returning a representation of the exception.
29 29
30 @return string representing the error message 30 @return string representing the error message
31 @rtype str
31 """ 32 """
32 return str(self._errorMessage) 33 return str(self._errorMessage)
33 34
34 def __str__(self): 35 def __str__(self):
35 """ 36 """
36 Special method returning a string representation of the exception. 37 Special method returning a string representation of the exception.
37 38
38 @return string representing the error message 39 @return string representing the error message
40 @rtype str
39 """ 41 """
40 return str(self._errorMessage) 42 return str(self._errorMessage)
41 43
42 44
43 class PluginPathError(PluginError): 45 class PluginPathError(PluginError):
48 50
49 def __init__(self, msg=None): 51 def __init__(self, msg=None):
50 """ 52 """
51 Constructor 53 Constructor
52 54
53 @param msg message to be used by the exception (string) 55 @param msg message to be used by the exception
56 @type str
54 """ 57 """
55 if msg: 58 if msg:
56 self._errorMessage = msg 59 self._errorMessage = msg
57 else: 60 else:
58 self._errorMessage = QCoreApplication.translate( 61 self._errorMessage = QCoreApplication.translate(
82 85
83 def __init__(self, name): 86 def __init__(self, name):
84 """ 87 """
85 Constructor 88 Constructor
86 89
87 @param name name of the plugin module (string) 90 @param name name of the plugin module
91 @type str
88 """ 92 """
89 self._errorMessage = QCoreApplication.translate( 93 self._errorMessage = QCoreApplication.translate(
90 "PluginError", "Error loading plugin module: {0}" 94 "PluginError", "Error loading plugin module: {0}"
91 ).format(name) 95 ).format(name)
92 96
99 103
100 def __init__(self, name): 104 def __init__(self, name):
101 """ 105 """
102 Constructor 106 Constructor
103 107
104 @param name name of the plugin module (string) 108 @param name name of the plugin module
109 @type str
105 """ 110 """
106 self._errorMessage = QCoreApplication.translate( 111 self._errorMessage = QCoreApplication.translate(
107 "PluginError", "Error activating plugin module: {0}" 112 "PluginError", "Error activating plugin module: {0}"
108 ).format(name) 113 ).format(name)
109 114
115 120
116 def __init__(self, name, missing): 121 def __init__(self, name, missing):
117 """ 122 """
118 Constructor 123 Constructor
119 124
120 @param name name of the plugin module (string) 125 @param name name of the plugin module
121 @param missing description of the missing element (string) 126 @type str
127 @param missing description of the missing element
128 @type str
122 """ 129 """
123 self._errorMessage = QCoreApplication.translate( 130 self._errorMessage = QCoreApplication.translate(
124 "PluginError", "The plugin module {0} is missing {1}." 131 "PluginError", "The plugin module {0} is missing {1}."
125 ).format(name, missing) 132 ).format(name, missing)
126 133
132 139
133 def __init__(self, name, class_, missing): 140 def __init__(self, name, class_, missing):
134 """ 141 """
135 Constructor 142 Constructor
136 143
137 @param name name of the plugin module (string) 144 @param name name of the plugin module
145 @type str
138 @param class_ name of the class not satisfying the requirements 146 @param class_ name of the class not satisfying the requirements
139 (string) 147
140 @param missing description of the missing element (string) 148 @type str
149 @param missing description of the missing element
150 @type str
141 """ 151 """
142 self._errorMessage = QCoreApplication.translate( 152 self._errorMessage = QCoreApplication.translate(
143 "PluginError", "The plugin class {0} of module {1} is missing {2}." 153 "PluginError", "The plugin class {0} of module {1} is missing {2}."
144 ).format(class_, name, missing) 154 ).format(class_, name, missing)

eric ide

mercurial