diff options
author | Joel Andres Granados <jgranado@redhat.com> | 2008-06-04 14:48:12 +0200 |
---|---|---|
committer | Joel Andres Granados <jgranado@redhat.com> | 2008-06-04 14:48:12 +0200 |
commit | 722fabcf3c513f3ebdb268433f855f1b50903a48 (patch) | |
tree | b2dbfca0f7aba35a27c0820ab7c4fb0f0b7815ab | |
parent | 097b8fe4772cc9ec501cf72edf094a3ac061fcd7 (diff) | |
download | firstaidkit-722fabcf3c513f3ebdb268433f855f1b50903a48.tar.gz firstaidkit-722fabcf3c513f3ebdb268433f855f1b50903a48.tar.xz firstaidkit-722fabcf3c513f3ebdb268433f855f1b50903a48.zip |
Create a general purpose exception for thing that dont have exception yet.
-rw-r--r-- | pyfirstaidkit/errors.py | 11 |
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 |