- 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.
- """
- pass
-
-class DeviceError(Error):
-
- def __init__(self, device):
- self.message = u'Device error : "%s"' % device
-
-class DeviceNotFoundError(DeviceError):
-
- def __init__(self, device):
- self.message = u'Device not found : "%s"' % device
-
-class AddressError(Error):
-
- def __init__(self, addr):
- self.message = u'Address error : "%s"' % addr
-
-class AddressNotFoundError(AddressError):
-
- def __init__(self, address):
- self.message = u'Address not found : "%s"' % address
-
-class AddressAlreadyExistsError(AddressError):
-
- def __init__(self, address):
- self.message = u'Address already exists : "%s"' % address
-
-class RouteError(Error):
-
- def __init__(self, route):
- self.message = u'Route error : "%s"' % route
-
-class RouteNotFoundError(RouteError):
-
- def __init__(self, route):
- self.message = u'Route not found : "%s"' % route
-
-class RouteAlreadyExistsError(RouteError):
-
- def __init__(self, route):
- self.message = u'Route already exists : "%s"' % route