1 """D-Bus exceptions."""
3 __all__
= ('DBusException', 'ConnectionError', 'MissingErrorHandlerException',
4 'MissingReplyHandlerException', 'ValidationException',
5 'IntrospectionParserException', 'UnknownMethodException',
10 DBusException
= _dbus_bindings
.DBusException
11 ConnectionError
= _dbus_bindings
.ConnectionError
13 class MissingErrorHandlerException(DBusException
):
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
):
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
)