Added handler for connection's exceptions.