Add some docstrings (reStructuredText with epydoc annotations)
[dbus-python-phuang.git] / dbus / exceptions.py
blobab43ce11d40d645c9f28fcdb223edeb724dca4e1
1 """D-Bus exceptions."""
3 __all__ = ('DBusException', 'ConnectionError', 'MissingErrorHandlerException',
4 'MissingReplyHandlerException', 'ValidationException',
5 'IntrospectionParserException', 'UnknownMethodException',
6 'NameExistsException')
8 import dbus_bindings
10 DBusException = dbus_bindings.DBusException
11 ConnectionError = dbus_bindings.ConnectionError
13 class MissingErrorHandlerException(DBusException):
14 def __init__(self):
15 DBusException.__init__(self, "error_handler not defined: if you define a reply_handler you must also define an error_handler")
17 class MissingReplyHandlerException(DBusException):
18 def __init__(self):
19 DBusException.__init__(self, "reply_handler not defined: if you define an error_handler you must also define a reply_handler")
21 class ValidationException(DBusException):
22 def __init__(self, msg=''):
23 DBusException.__init__(self, "Error validating string: %s"%msg)
25 class IntrospectionParserException(DBusException):
26 def __init__(self, msg=''):
27 DBusException.__init__(self, "Error parsing introspect data: %s"%msg)
29 class UnknownMethodException(DBusException):
30 def __init__(self, method):
31 DBusException.__init__(self, "Unknown method: %s"%method)
33 class NameExistsException(DBusException):
34 def __init__(self, name):
35 DBusException.__init__(self, "Bus name already exists: %s"%name)