Commit 8d1ba928 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Include more informations in exception message.

git-svn-id: 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e31442dc
......@@ -39,7 +39,8 @@ class BaseHandler(EventHandler):
"""Redirect all received packet to dispatcher thread."""
if packet.isResponse():
if not self.dispatcher.dispatch(conn, packet.getId(), (conn, packet)):
raise ProtocolError('Unexpected response packet')
raise ProtocolError('Unexpected response packet from %r: %r',
conn, packet)
self.dispatch(conn, packet)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment