Mercurial > repos > bgruening > silicos_it
annotate qed/errors.py @ 24:1c218c2a4bd8 default tip
ChemicalToolBoX update.
| author | Bjoern Gruening <bjoern.gruening@gmail.com> |
|---|---|
| date | Tue, 23 Jul 2013 14:54:12 +0200 |
| parents | 80efb29755f3 |
| children |
| rev | line source |
|---|---|
| 0 | 1 __all__ = ['SilicosItError', 'WrongArgument'] |
| 2 | |
| 3 class SilicosItError(Exception): | |
| 4 """Base class for exceptions in Silicos-it code""" | |
| 5 pass | |
| 6 | |
| 7 class WrongArgument(SilicosItError): | |
| 8 """ | |
| 9 Exception raised when argument to function is not of correct type. | |
| 10 | |
| 11 Attributes: | |
| 12 function -- function in which error occurred | |
| 13 msg -- explanation of the error | |
| 14 """ | |
| 15 def __init__(self, function, msg): | |
| 16 self.function = function | |
| 17 self.msg = msg |
