summaryrefslogtreecommitdiffstats
path: root/deluge/ui/client.py
diff options
context:
space:
mode:
authorPedro Algarvio <pedro@algarvio.me>2011-06-05 22:44:01 +0100
committerPedro Algarvio <pedro@algarvio.me>2011-06-05 22:44:01 +0100
commitddc0957e3ef0914b82792c3d08765854f0d8f727 (patch)
tree16be51bada065e5d582929ad8fe8fe750bdf1e86 /deluge/ui/client.py
parent2f71ef4264de9b814e111236efc05b2de63e1db1 (diff)
downloaddeluge-ddc0957e3ef0914b82792c3d08765854f0d8f727.tar.gz
deluge-ddc0957e3ef0914b82792c3d08765854f0d8f727.tar.bz2
deluge-ddc0957e3ef0914b82792c3d08765854f0d8f727.zip
Wrap non deluge exceptions so that they can also be sent to the client.
Diffstat (limited to 'deluge/ui/client.py')
-rw-r--r--deluge/ui/client.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/deluge/ui/client.py b/deluge/ui/client.py
index 31fb305a3..269da605e 100644
--- a/deluge/ui/client.py
+++ b/deluge/ui/client.py
@@ -194,8 +194,12 @@ class DelugeRPCProtocol(Protocol):
msg += "\n" + "-" * 80
msg += "\n" + "RPCRequest: " + r.__repr__()
msg += "\n" + "-" * 80
- msg += "\n" + request[5] + "\n" + request[2] + ": "
- msg += str(exception)
+ if isinstance(exception, error.WrappedException):
+ msg += "\n" + exception.type + "\n" + exception.message + ": "
+ msg += exception.traceback
+ else:
+ msg += "\n" + request[5] + "\n" + request[2] + ": "
+ msg += str(exception)
msg += "\n" + "-" * 80
if not isinstance(exception, error._ClientSideRecreateError):
@@ -203,7 +207,7 @@ class DelugeRPCProtocol(Protocol):
log.error(msg)
else:
# The rest just get's logged in debug level, just to log
- # what's happending
+ # what's happening
log.debug(msg)
d.errback(exception)
@@ -617,7 +621,7 @@ class Client(object):
self._daemon_proxy.disconnect()
self.stop_classic_mode()
return
-
+
if self._daemon_proxy:
return self._daemon_proxy.disconnect()
@@ -634,7 +638,7 @@ class Client(object):
"""
self._daemon_proxy = None
self.__started_in_classic = False
-
+
def start_daemon(self, port, config):
"""
Starts a daemon process.