summaryrefslogtreecommitdiffstats
path: root/python/exceptions.py
blob: 5cb8d5a3da252bb3a634016087a8e979b35c3494 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import dbus_bindings

DBusException = dbus_bindings.DBusException
ConnectionError = dbus_bindings.ConnectionError

class MissingErrorHandlerException(DBusException):
    def __init__(self):
        DBusException.__init__(self, "error_handler not defined: if you define a reply_handler you must also define an error_handler")

class MissingReplyHandlerException(DBusException):
    def __init__(self):
        DBusException.__init__(self, "reply_handler not defined: if you define an error_handler you must also define a reply_handler")

class ValidationException(DBusException):
    def __init__(self, msg=''):
        DBusException.__init__(self, "Error validating string: %s"%msg)

class IntrospectionParserException(DBusException):
    def __init__(self, msg=''):
            DBusException.__init__(self, "Error parsing introspect data: %s"%msg)

class UnknownMethodException(DBusException):
    def __init__(self, msg=''):
        DBusException.__init__("Unknown method: %s"%msg)