Commit e1030c7f authored by Aurel's avatar Aurel

when catching an unknown exception, advertise it


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@392 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 15192a6f
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
import logging import logging
from neo.locking import RLock from neo.locking import RLock
import sys
import traceback
from neo.protocol import Packet, ProtocolError from neo.protocol import Packet, ProtocolError
from neo.event import IdleEvent from neo.event import IdleEvent
...@@ -241,6 +243,8 @@ class Connection(BaseConnection): ...@@ -241,6 +243,8 @@ class Connection(BaseConnection):
except ConnectorTryAgainException: except ConnectorTryAgainException:
pass pass
except: except:
traceback.print_exc()
logging.warning('recv called on %s(%s) failed.'%(self, self.getAddress()))
self.handler.connectionClosed(self) self.handler.connectionClosed(self)
self.close() self.close()
...@@ -264,6 +268,8 @@ class Connection(BaseConnection): ...@@ -264,6 +268,8 @@ class Connection(BaseConnection):
except ConnectorTryAgainException: except ConnectorTryAgainException:
return return
except: except:
traceback.print_exc()
logging.warning('send called on %s(%s) failed.'%(self, self.getAddress()))
self.handler.connectionClosed(self) self.handler.connectionClosed(self)
self.close() self.close()
...@@ -332,6 +338,8 @@ class ClientConnection(Connection): ...@@ -332,6 +338,8 @@ class ClientConnection(Connection):
self.handler.connectionCompleted(self) self.handler.connectionCompleted(self)
event_manager.addReader(self) event_manager.addReader(self)
except: except:
traceback.print_exc()
logging.warning('send called on %s(%s) failed.'%(self, self.getAddress()))
handler.connectionFailed(self) handler.connectionFailed(self)
self.close() self.close()
......
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