bridge: DBusException also transports the twisted failure condition
This commit is contained in:
parent
8867ac6c60
commit
bba25dd62d
1 changed files with 45 additions and 5 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue