- TransactionalHandler
-
-__ALL__ = ('IpHandler', 'Error','DeviceError', 'DeviceNotFoundError',
- 'RouteError', 'RouteNotFoundError', 'RouteAlreadyExistsError',
- 'AddressError', 'AddressNotFoundError', 'AddressAlreadyExistsError')
-
-class Error(HandlerError):
- r"""
- Error(command) -> Error instance :: Base IpHandler exception class.
-
- All exceptions raised by the IpHandler inherits from this one, so you can
- easily catch any IpHandler exception.
-
- message - A descriptive error message.
- """
-
- def __init__(self, message):
- r"Initialize the Error object. See class documentation for more info."
- self.message = message
-
- def __str__(self):
- return self.message
-
-class DeviceError(Error):
-
- def __init__(self, device):
- self.message = 'Device error : "%s"' % device
-
-class DeviceNotFoundError(DeviceError):
-
- def __init__(self, device):
- self.message = 'Device not found : "%s"' % device
-
-class AddressError(Error):
-
- def __init__(self, addr):
- self.message = 'Address error : "%s"' % addr
-
-class AddressNotFoundError(AddressError):
-
- def __init__(self, address):
- self.message = 'Address not found : "%s"' % address
-
-class AddressAlreadyExistsError(AddressError):
-
- def __init__(self, address):
- self.message = 'Address already exists : "%s"' % address
-
-class RouteError(Error):
-
- def __init__(self, route):
- self.message = 'Route error : "%s"' % route
-
-class RouteNotFoundError(RouteError):
-
- def __init__(self, route):
- self.message = 'Route not found : "%s"' % route
-
-class RouteAlreadyExistsError(RouteError):
-
- def __init__(self, route):
- self.message = 'Route already exists : "%s"' % route