Package ioids :: Module errorhandling
[hide private]
[frames] | no frames]

Source Code for Module ioids.errorhandling

 1  """ 
 2  Error handling 
 3   
 4  Inter-Organisational Intrusion Detection System (IOIDS) 
 5   
 6  @author: Michael Pilgermann 
 7  @contact: mailto:mpilgerm@glam.ac.uk 
 8  @license: GPL (General Public License) 
 9  """ 
10   
11 -class IoidsException(Exception):
12 """ 13 Super class for all IOIDS exceptions. 14 """ 15
16 - def __init__(self, message=None):
17 """ 18 Passes the message arguments to the args attribute of the common L{Exception} instance. 19 """ 20 self.args = (message) 21 self._message = message
22
23 - def getMessage(self):
24 return self._message
25 26
27 -class IoidsDatabaseException(IoidsException):
28 """ 29 Exception for database problems. 30 """
31 - def __init__(self, message):
32 """ 33 Passes the message to the super constructor. 34 """ 35 IoidsException.__init__(self, message)
36
37 -class IoidsFormatException(IoidsException):
38 """ 39 Exception for format problems (xml parsing mainly). 40 """
41 - def __init__(self, message):
42 """ 43 Passes the message to the super constructor. 44 """ 45 IoidsException.__init__(self, message)
46
47 -class IoidsDependencyException(IoidsException):
48 """ 49 Exception for dependency problems . 50 """
51 - def __init__(self, message):
52 """ 53 Passes the message to the super constructor. 54 """ 55 IoidsException.__init__(self, message)
56
57 -class IoidsDescriptionException(IoidsException):
58 """ 59 Exception for description problems . 60 """
61 - def __init__(self, message):
62 """ 63 Passes the message to the super constructor. 64 """ 65 IoidsException.__init__(self, message)
66