bridge: DBusException also transports the twisted failure condition

This commit is contained in:
souliane 2014-06-15 16:06:02 +02:00
commit bba25dd62d

View file

@ -29,15 +29,17 @@ class BridgeFrontend(object):
class BridgeException(Exception):
"""An exception which has been raised from the backend and arrived to the frontend."""
def __init__(self, name, message):
def __init__(self, name, message='', condition=''):
"""
@param name (str): full exception class name (with module)
@param message (str): error message
@param condition (str) : error condition
"""
Exception.__init__(self)
self.fullname = unicode(name)
self.message = unicode(message)
self.condition = unicode(condition) if condition else ''
self.module, dummy, self.classname = unicode(self.fullname).rpartition('.')
def __str__(self):