Mercurial > repos > bgruening > silicos_it
diff qed/errors.py @ 0:bb92d30b4f52 draft
Uploaded
author | bgruening |
---|---|
date | Thu, 15 Aug 2013 03:34:00 -0400 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qed/errors.py Thu Aug 15 03:34:00 2013 -0400 @@ -0,0 +1,17 @@ +__all__ = ['SilicosItError', 'WrongArgument'] + +class SilicosItError(Exception): + """Base class for exceptions in Silicos-it code""" + pass + +class WrongArgument(SilicosItError): + """ + Exception raised when argument to function is not of correct type. + + Attributes: + function -- function in which error occurred + msg -- explanation of the error + """ + def __init__(self, function, msg): + self.function = function + self.msg = msg