2005-11-15 Robert McQueen <robot101@debian.org>
[platform/upstream/dbus.git] / python / exceptions.py
1 import dbus_bindings
2
3 DBusException = dbus_bindings.DBusException
4 ConnectionError = dbus_bindings.ConnectionError
5
6 class MissingErrorHandlerException(DBusException):
7     def __init__(self):
8         DBusException.__init__(self, "error_handler not defined: if you define a reply_handler you must also define an error_handler")
9
10 class MissingReplyHandlerException(DBusException):
11     def __init__(self):
12         DBusException.__init__(self, "reply_handler not defined: if you define an error_handler you must also define a reply_handler")
13
14 class ValidationException(DBusException):
15     def __init__(self, msg=''):
16         DBusException.__init__(self, "Error validating string: %s"%msg)
17
18 class IntrospectionParserException(DBusException):
19     def __init__(self, msg=''):
20         DBusException.__init__(self, "Error parsing introspect data: %s"%msg)
21
22 class UnknownMethodException(DBusException):
23     def __init__(self, method):
24         DBusException.__init__(self, "Unknown method: %s"%method)
25
26 class NameExistsException(DBusException):
27     def __init__(self, name):
28         DBusException.__init__(self, "Bus name already exists: %s"%name)
29