summaryrefslogtreecommitdiffstats
path: root/pyfirstaidkit
diff options
context:
space:
mode:
authorJoel Andres Granados <jgranado@redhat.com>2008-06-04 14:48:12 +0200
committerJoel Andres Granados <jgranado@redhat.com>2008-06-04 14:48:12 +0200
commit722fabcf3c513f3ebdb268433f855f1b50903a48 (patch)
treeb2dbfca0f7aba35a27c0820ab7c4fb0f0b7815ab /pyfirstaidkit
parent097b8fe4772cc9ec501cf72edf094a3ac061fcd7 (diff)
downloadfirstaidkit-722fabcf3c513f3ebdb268433f855f1b50903a48.tar.gz
firstaidkit-722fabcf3c513f3ebdb268433f855f1b50903a48.tar.xz
firstaidkit-722fabcf3c513f3ebdb268433f855f1b50903a48.zip
Create a general purpose exception for thing that dont have exception yet.
Diffstat (limited to 'pyfirstaidkit')
-rw-r--r--pyfirstaidkit/errors.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pyfirstaidkit/errors.py b/pyfirstaidkit/errors.py
index 31f1739..9ce9500 100644
--- a/pyfirstaidkit/errors.py
+++ b/pyfirstaidkit/errors.py
@@ -33,3 +33,14 @@ class InvalidPluginNameException(Exception):
self.message="There are no flows by the name of %s" % name
def __str__(self):
return self.message
+
+class GeneralPluginException(Exception):
+ """General exception
+
+ This exception should be used for all exceptions that come from the plugins and
+ have no specific exception class yet.
+ """
+ def __init__(self, plugin, message):
+ self.message="There was an exception in plugin %s with message %s"%(plugin,message)
+ def __str__(self):
+ return self.message