Fix for exception handling.

This commit is contained in:
Stephen Diehl
2012-02-17 14:23:01 -05:00
parent 2550066c63
commit 45cbf4458f
+4 -3
View File
@@ -64,9 +64,10 @@ class Component(object):
#close all the sockets
for sock in self.sockets:
sock.close()
except:
qutil.LOGGER.exception("Unexpected error in run for {id}.".format(id=self.get_id()))
except Exception as e:
qutil.LOGGER.exception("Unexpected error in run for {id}.".format(id=self.get_id()))
raise e
finally:
self.context.destroy()
@@ -476,4 +477,4 @@ class DataSource(Component):
self.data_socket.send(json.dumps(event))
def get_type(self):
raise NotImplemented
raise NotImplemented