Package smach :: Module exceptions

Source Code for Module smach.exceptions

 1   
 2  import smach 
 3   
 4  __all__ = ['SmachError', 
 5             'InvalidTransitionError', 
 6             'InvalidStateError', 
 7             'InvalidConstructionError', 
 8             'InvalidUserCodeError'] 
 9   
10   
11 -class SmachError(Exception):
12 """Exception printing to console on instantiation"""
13 - def __init__(self, message):
14 smach.logerr(self.__class__.__name__ + ": " + message) 15 Exception.__init__(self, message)
16 17
18 -class InvalidTransitionError(SmachError):
19 - def __init__(self, message):
20 SmachError.__init__(self, message)
21
22 -class InvalidStateError(SmachError):
23 - def __init__(self, message):
24 SmachError.__init__(self, message)
25
26 -class InvalidUserCodeError(SmachError):
27 - def __init__(self, message):
28 SmachError.__init__(self, message)
29
30 -class InvalidConstructionError(SmachError):
31 - def __init__(self, message):
32 SmachError.__init__(self, message)
33