1 """D-Bus exceptions."""
3 __all__
= ('DBusException', 'MissingErrorHandlerException',
4 'MissingReplyHandlerException', 'ValidationException',
5 'IntrospectionParserException', 'UnknownMethodException',
10 DBusException
= _dbus_bindings
.DBusException
12 class MissingErrorHandlerException(DBusException
):
14 DBusException
.__init
__(self
, "error_handler not defined: if you define a reply_handler you must also define an error_handler")
16 class MissingReplyHandlerException(DBusException
):
18 DBusException
.__init
__(self
, "reply_handler not defined: if you define an error_handler you must also define a reply_handler")
20 class ValidationException(DBusException
):
21 def __init__(self
, msg
=''):
22 DBusException
.__init
__(self
, "Error validating string: %s"%msg
)
24 class IntrospectionParserException(DBusException
):
25 def __init__(self
, msg
=''):
26 DBusException
.__init
__(self
, "Error parsing introspect data: %s"%msg
)
28 class UnknownMethodException(DBusException
):
29 def __init__(self
, method
):
30 DBusException
.__init
__(self
, "Unknown method: %s"%method
)
32 class NameExistsException(DBusException
):
33 def __init__(self
, name
):
34 DBusException
.__init
__(self
, "Bus name already exists: %s"%name
)