--- a/PluginManager/PluginExceptions.py Fri Mar 11 08:55:14 2011 +0100 +++ b/PluginManager/PluginExceptions.py Fri Mar 11 16:51:57 2011 +0100 @@ -9,6 +9,7 @@ from PyQt4.QtGui import QApplication + class PluginError(Exception): """ Class defining a special error for the plugin classes. @@ -36,12 +37,13 @@ """ return str(self._errorMessage) + class PluginPathError(PluginError): """ Class defining an error raised, when the plugin paths were not found and could not be created. """ - def __init__(self, msg = None): + def __init__(self, msg=None): """ Constructor @@ -51,9 +53,10 @@ self._errorMessage = msg else: self._errorMessage = \ - QApplication.translate("PluginError", + QApplication.translate("PluginError", "Plugin paths not found or not creatable.") + class PluginModulesError(PluginError): """ Class defining an error raised, when no plugin modules were found. @@ -65,6 +68,7 @@ self._errorMessage = \ QApplication.translate("PluginError", "No plugin modules found.") + class PluginLoadError(PluginError): """ Class defining an error raised, when there was an error during plugin loading. @@ -79,6 +83,7 @@ QApplication.translate("PluginError", "Error loading plugin module: {0}")\ .format(name) + class PluginActivationError(PluginError): """ Class defining an error raised, when there was an error during plugin activation. @@ -93,6 +98,7 @@ QApplication.translate("PluginError", "Error activating plugin module: {0}")\ .format(name) + class PluginModuleFormatError(PluginError): """ Class defining an error raised, when the plugin module is invalid. @@ -105,10 +111,11 @@ @param missing description of the missing element (string) """ self._errorMessage = \ - QApplication.translate("PluginError", + QApplication.translate("PluginError", "The plugin module {0} is missing {1}.")\ .format(name, missing) + class PluginClassFormatError(PluginError): """ Class defining an error raised, when the plugin module's class is invalid. @@ -122,6 +129,6 @@ @param missing description of the missing element (string) """ self._errorMessage = \ - QApplication.translate("PluginError", + QApplication.translate("PluginError", "The plugin class {0} of module {1} is missing {2}.")\ .format(class_, name, missing)